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 a2e09f1 commit 158b9bcCopy full SHA for 158b9bc
src/main/java/org/java_websocket/server/WebSocketServer.java
@@ -8,6 +8,7 @@
8
importjava.nio.ByteBuffer;
9
importjava.nio.channels.ByteChannel;
10
importjava.nio.channels.CancelledKeyException;
11
+importjava.nio.channels.ClosedByInterruptException;
12
importjava.nio.channels.SelectableChannel;
13
importjava.nio.channels.SelectionKey;
14
importjava.nio.channels.Selector;
@@ -368,6 +369,8 @@ public void run(){
368
369
}
370
} catch ( CancelledKeyExceptione ){
371
// an other thread may cancel the key
372
+ } catch ( ClosedByInterruptExceptione ){
373
+return; // do the same stuff as when InterruptedException is thrown
374
} catch ( IOExceptionex ){
375
if( key != null )
376
key.cancel();
0 commit comments