In effect addeed socket recovery logic; added deubug hook

This commit is contained in:
2023-10-18 21:02:46 -05:00
parent 37d7075079
commit a85bdcf019
2 changed files with 34 additions and 8 deletions

View File

@@ -25,7 +25,7 @@ class Application(IPCServer):
try:
self.create_ipc_listener()
except Exception:
...
self.socket_realization_check()
if not self.is_ipc_alive:
for arg in unknownargs + [args.new_tab,]:
@@ -35,6 +35,16 @@ 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()
def setup_debug_hook(self):
try:
# kill -SIGUSR2 <pid> from Linux/Unix or SIGBREAK signal from Windows
signal.signal(
@@ -44,5 +54,3 @@ class Application(IPCServer):
except ValueError:
# Typically: ValueError: signal only works in main thread
...
Window(args, unknownargs)