Skip to content

Commit dd4323d

Browse files
felixvfmarci4
authored andcommitted
Deadlock due to race condition in WebSocketServer.stop
1 parent d6de24f commit dd4323d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/org/java_websocket/server/WebSocketServer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,8 +219,8 @@ public void stop( int timeout ) throws InterruptedException {
219219

220220
synchronized ( this ) {
221221
if( selectorthread != null && selectorthread != Thread.currentThread() ) {
222-
selector.wakeup();
223222
selectorthread.interrupt();
223+
selector.wakeup();
224224
selectorthread.join( timeout );
225225
}
226226
}

0 commit comments

Comments
 (0)