develop #13
|
@ -22,9 +22,6 @@ class Application(IPCServer):
|
||||||
super(Application, self).__init__()
|
super(Application, self).__init__()
|
||||||
|
|
||||||
if not settings_manager.is_trace_debug():
|
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:
|
if not self.is_ipc_alive:
|
||||||
|
@ -36,13 +33,19 @@ class Application(IPCServer):
|
||||||
raise AppLaunchException(f"{app_name} IPC Server Exists: Will send path(s) to it and close...")
|
raise AppLaunchException(f"{app_name} IPC Server Exists: Will send path(s) to it and close...")
|
||||||
|
|
||||||
self.setup_debug_hook()
|
self.setup_debug_hook()
|
||||||
|
|
||||||
Window(args, unknownargs)
|
Window(args, unknownargs)
|
||||||
|
|
||||||
|
|
||||||
def socket_realization_check(self):
|
def socket_realization_check(self):
|
||||||
self.send_test_ipc_message()
|
try:
|
||||||
self.create_ipc_listener()
|
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):
|
def setup_debug_hook(self):
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -40,7 +40,7 @@ class IPCServer(Singleton):
|
||||||
|
|
||||||
def create_ipc_listener(self) -> None:
|
def create_ipc_listener(self) -> None:
|
||||||
if self._conn_type == "socket":
|
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)
|
os.unlink(self._ipc_address)
|
||||||
|
|
||||||
listener = Listener(address = self._ipc_address, family = "AF_UNIX", authkey = self._ipc_authkey)
|
listener = Listener(address = self._ipc_address, family = "AF_UNIX", authkey = self._ipc_authkey)
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
"""
|
"""
|
||||||
Utils module
|
Types module
|
||||||
"""
|
"""
|
Loading…
Reference in New Issue