Skip to content

Commit 6930555

Browse files
author
David
committed
Revert "quickfix for TooTallNate#168"
This reverts commit 5d4dead.
1 parent 5d4dead commit 6930555

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

src/main/java/org/java_websocket/WebSocketImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ protected synchronized void closeConnection( int code, String message, boolean r
465465
handshakerequest = null;
466466

467467
readystate = READYSTATE.CLOSED;
468-
this.outQueue.clear();
468+
469469
}
470470

471471
protected void closeConnection( int code, boolean remote ) {

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

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -529,12 +529,7 @@ public final void onWebsocketError( WebSocket conn, Exception ex ) {
529529
@Override
530530
public final void onWriteDemand( WebSocket w ) {
531531
WebSocketImpl conn = (WebSocketImpl) w;
532-
try {
533-
conn.key.interestOps( SelectionKey.OP_READ | SelectionKey.OP_WRITE );
534-
} catch ( CancelledKeyException e ) {
535-
// the thread which cancels key is responsible for possible cleanup
536-
conn.outQueue.clear();
537-
}
532+
conn.key.interestOps( SelectionKey.OP_READ | SelectionKey.OP_WRITE );
538533
selector.wakeup();
539534
}
540535

0 commit comments

Comments
 (0)