Skip to content

Commit 5bba0cc

Browse files
committed
made sure that the Interrupted State is never cleared of
1 parent 6e7cf0f commit 5bba0cc

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

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

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -175,10 +175,6 @@ public void start() {
175175
*
176176
* If this method is called before the server is started it will never start.
177177
*
178-
* Therefore
179-
*
180-
* Additionally
181-
*
182178
* @param timeout
183179
* Specifies how many milliseconds shall pass between initiating the close handshakes with the connected clients and closing the servers socket channel.
184180
*
@@ -432,6 +428,7 @@ private void handleFatal( WebSocket conn, RuntimeException e ) {
432428
} catch ( IOException e1 ) {
433429
onError( null, e1 );
434430
} catch ( InterruptedException e1 ) {
431+
Thread.currentThread().interrupt();
435432
onError( null, e1 );
436433
}
437434
}
@@ -486,8 +483,7 @@ public final void onWebsocketClose( WebSocket conn, int code, String reason, boo
486483
try {
487484
releaseBuffers( conn );
488485
} catch ( InterruptedException e ) {
489-
e.printStackTrace();
490-
// TODO handle InterruptedException
486+
Thread.currentThread().interrupt();
491487
}
492488
}
493489

0 commit comments

Comments
 (0)