We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b1b0934 commit 877314dCopy full SHA for 877314d
src/net/tootallnate/websocket/WebSocketClient.java
@@ -120,8 +120,9 @@ public void close() throws IOException
120
{
121
if (running)
122
123
+ running = false; // must be called to stop do loop
124
selector.wakeup();
- conn.close();
125
+ conn.close(); // synchronously calling onClose(conn)
126
}
127
128
@@ -364,11 +365,7 @@ public void onOpen(WebSocket conn) {
364
365
*/
366
public void onClose(WebSocket conn)
367
- if (running)
368
- {
369
- onClose();
370
- }
371
-
+ onClose();
372
releaseAndInitialize();
373
374
0 commit comments