Firstbober / krita-rpc

Discord Rich Presence extension for Krita
GNU General Public License v3.0
89 stars 5 forks source link

Krita hangs at launching when offline #9

Open ravener opened 6 months ago

ravener commented 6 months ago

I can't work offline with this extension enabled, if I'm online it launches quickly, but if I turn off wifi, krita seems to just hang in the loading screen and even the operating system starts reporting that the application is not responding, turn on wifi and it immediately continues. maybe the code needs to handle connection errors more gracefully to allow offline work? If it matters I'm on Debian 12 using Krita 5.2.2 AppImage.

ravener commented 6 months ago

actually this only seems to happen when i forgot i had discord open after going offline, close discord entirely and it works, it just seems that if discord is still on and exposing the sockets, it'd hang until discord regains connection again, i'll let you decide if that's also a bug because for example other apps like VSCode rich presence would instead throw an RPC Timeout and fail to connect instead of hanging until discord is reconnected.

Firstbober commented 6 months ago

I think that we shouldn't block entire Krita if we can't connect to discord :sweat_smile: I'll fix it in the meantime and notify you.

ravener commented 6 months ago

while you are at it I would also suggest adding an option on this menu to Reconnect to Discord so for example if I reopen discord later after an offline session I can reconnect it back.

image