1
0
mirror of https://github.com/moparisthebest/Yaaic synced 2024-11-12 03:55:01 -05:00
Yaaic/application
Steven Luo aaf3f3e332 Prevent race between IRCConnection dispose() and onDisconnect() when quitting
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.
2011-06-08 23:11:29 +02:00
..
.settings Adjusted code formatter (eclipse) 2011-01-15 23:49:25 +01:00
res IME behavior changes for the ConversationActivity 2011-06-08 23:11:28 +02:00
src/org Prevent race between IRCConnection dispose() and onDisconnect() when quitting 2011-06-08 23:11:29 +02:00
.classpath Remove tagsoup dependency. Improve mIRC color code parsing speed. 2011-03-27 19:42:05 +02:00
.project Merged application and test project into one repository 2010-11-07 08:35:45 +01:00
AndroidManifest.xml Updated version number: Yaaic 0.8 2011-04-15 22:00:55 +02:00
build.properties Merged application and test project into one repository 2010-11-07 08:35:45 +01:00
build.xml Merged application and test project into one repository 2010-11-07 08:35:45 +01:00
default.properties Target and minimum SDK Version set to 4 (Android 1.6) 2011-02-19 21:09:44 +01:00