Skip to content

Commit

Permalink
Try workaround
Browse files Browse the repository at this point in the history
Try Workaround mentioned in python/cpython#113964
  • Loading branch information
damies13 committed Feb 18, 2024
1 parent 6a2ea40 commit bccc704
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions rfswarm_manager/rfswarm.py
Original file line number Diff line number Diff line change
Expand Up @@ -2347,6 +2347,9 @@ def mainloop(self):
if not base.args.nogui:
base.gui.mainloop()

while base.run_dbthread:
time.sleep(300)

base.debugmsg(5, "mainloop end")

def on_closing(self, _event=None, *args):
Expand Down Expand Up @@ -2414,12 +2417,7 @@ def run_agent_server(self):

server_address = (srvip, srvport)
try:
if sys.version_info >= (3, 12):
# not sure if this is the besst solution, may cause more
# problmes than it fixes, but it's an attempt
base.agenthttpserver = HTTPServer(server_address, AgentServer)
else:
base.agenthttpserver = ThreadingHTTPServer(server_address, AgentServer)
base.agenthttpserver = ThreadingHTTPServer(server_address, AgentServer)
except PermissionError:
base.debugmsg(0, "Permission denied when trying :", server_address)
self.on_closing()
Expand Down

0 comments on commit bccc704

Please sign in to comment.