Small IPC fixes

This commit is contained in:
itdominator 2023-10-18 21:51:24 -05:00
parent 6fe4db7c63
commit 8862a80eea
3 changed files with 13 additions and 10 deletions

View File

@ -22,10 +22,7 @@ class Application(IPCServer):
super(Application, self).__init__()
if not settings_manager.is_trace_debug():
try:
self.create_ipc_listener()
except Exception:
self.socket_realization_check()
self.socket_realization_check()
if not self.is_ipc_alive:
for arg in unknownargs + [args.new_tab,]:
@ -36,13 +33,19 @@ class Application(IPCServer):
raise AppLaunchException(f"{app_name} IPC Server Exists: Will send path(s) to it and close...")
self.setup_debug_hook()
Window(args, unknownargs)
def socket_realization_check(self):
self.send_test_ipc_message()
self.create_ipc_listener()
try:
self.create_ipc_listener()
except Exception:
self.send_test_ipc_message()
try:
self.create_ipc_listener()
except Exception as e:
...
def setup_debug_hook(self):
try:

View File

@ -40,7 +40,7 @@ class IPCServer(Singleton):
def create_ipc_listener(self) -> None:
if self._conn_type == "socket":
if os.path.exists(self._ipc_address) and settings.is_dirty_start():
if os.path.exists(self._ipc_address) and settings_manager.is_dirty_start():
os.unlink(self._ipc_address)
listener = Listener(address = self._ipc_address, family = "AF_UNIX", authkey = self._ipc_authkey)

View File

@ -1,3 +1,3 @@
"""
Utils module
"""
Types module
"""