adding guard in IPC, adding settings

This commit is contained in:
2023-03-25 15:57:13 -05:00
parent ba94493fb8
commit 48d6c505a7
2 changed files with 31 additions and 9 deletions

View File

@@ -55,10 +55,14 @@ class IPCServer:
@daemon_threaded
def _run_ipc_loop(self, listener) -> None:
# NOTE: Not thread safe if using with Gtk. Need to import GLib and use idle_add
while True:
conn = listener.accept()
start_time = time.perf_counter()
self._handle_ipc_message(conn, start_time)
try:
conn = listener.accept()
start_time = time.perf_counter()
self._handle_ipc_message(conn, start_time)
except Exception as e:
...
listener.close()