In effect addeed socket recovery logic; added deubug hook
This commit is contained in:
14
src/app.py
14
src/app.py
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user