mirror of
https://github.com/moparisthebest/Yaaic
synced 2024-11-12 03:55:01 -05:00
aaf3f3e332
When the user asks for a disconnect from the ConversationActivity, there is a race between the IRCConnection, which is waiting for the server to acknowledge the QUIT before calling onDisconnect(), and the IRCService, which will invoke dispose() on the IRCConnection when checkServiceStatus() is called during the activity shutdown. If the dispose() wins, the thread running the onDisconnect() is terminated, leading to the cleanup being unfinished. This causes the disconnect notification to be unreliable, and can result in the list of servers in the ongoing notification to be out of sync with reality. To fix this, introduce a new field isQuitting to the IRCConnection, which is set to true when quitServer() is called and cleared once onDisconnect() has finished. If dispose() is called while isQuitting is set, it sets disposeRequested instead of doing the dispose itself, and onDisconnect() will call through to super.dispose() once it's finished. Note that this requires a change to PircBot to allow the overriding of quitServer(String message), which is declared final upstream. |
||
---|---|---|
.. | ||
.settings | ||
res | ||
src/org | ||
.classpath | ||
.project | ||
AndroidManifest.xml | ||
build.properties | ||
build.xml | ||
default.properties |