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
import java.nio.ByteBuffer;
9
import java.nio.channels.ByteChannel;
10
import java.nio.channels.CancelledKeyException;
11
+import java.nio.channels.ClosedByInterruptException;
12
import java.nio.channels.SelectableChannel;
13
import java.nio.channels.SelectionKey;
14
import java.nio.channels.Selector;
@@ -368,6 +369,8 @@ public void run() {
368
369
}
370
} catch ( CancelledKeyException e ) {
371
// an other thread may cancel the key
372
+ } catch ( ClosedByInterruptException e ) {
373
+ return; // do the same stuff as when InterruptedException is thrown
374
} catch ( IOException ex ) {
375
if( key != null )
376
key.cancel();
0 commit comments