Browse Source

Publish nicklist clear events synchronously.

Fixes DMDirc/Parser#62
pull/467/head
Chris Smith 9 years ago
parent
commit
3633459198
1 changed files with 3 additions and 1 deletions
  1. 3
    1
      src/com/dmdirc/Channel.java

+ 3
- 1
src/com/dmdirc/Channel.java View File

@@ -270,7 +270,9 @@ public class Channel extends FrameContainer implements GroupChat {
270 270
 
271 271
         setIcon("channel-inactive");
272 272
 
273
-        getEventBus().publishAsync(new NickListClientsChangedEvent(this,
273
+        // Needs to be published synchronously so that nicklists are cleared before the parser
274
+        // is disconnected (which happens synchronously after this method returns).
275
+        getEventBus().publish(new NickListClientsChangedEvent(this,
274 276
                 Collections.<GroupChatUser>emptyList()));
275 277
     }
276 278
 

Loading…
Cancel
Save