Currently, when an instance is already running and another one is started, the second one fails to lock the database and exits. If the first one somehow lost its systray icon, there might not be any normal way to stop it. Also, the user might expect at least another browser window to pop up when they start the application again.
I guess we can handle this by letting the second instance connect to the first one through HTTP or something like that, though it might need access to the JWT secret to authenticate (which won't work if the secret is inside the database). Or perhaps it could somehow figure out the process id of the first instance and kill it? Maybe something else?
Currently, when an instance is already running and another one is started, the second one fails to lock the database and exits. If the first one somehow lost its systray icon, there might not be any normal way to stop it. Also, the user might expect at least another browser window to pop up when they start the application again.
I guess we can handle this by letting the second instance connect to the first one through HTTP or something like that, though it might need access to the JWT secret to authenticate (which won't work if the secret is inside the database). Or perhaps it could somehow figure out the process id of the first instance and kill it? Maybe something else?