Skip to content

Commit 9cc5d7f

Browse files
authored
Merge pull request TooTallNate#549 from marci4/master
Ignore Broken pipe exception
2 parents 37e9b08 + 8e4deaf commit 9cc5d7f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,13 @@ public synchronized void closeConnection( int code, String message, boolean remo
478478
try {
479479
channel.close();
480480
} catch ( IOException e ) {
481-
wsl.onWebsocketError( this, e );
481+
if (e.getMessage().equals( "Broken pipe" )) {
482+
if (WebSocketImpl.DEBUG) {
483+
System.out.println("Caught IOException: Broken pipe during closeConnection()");
484+
}
485+
} else {
486+
wsl.onWebsocketError( this, e );
487+
}
482488
}
483489
}
484490
try {

0 commit comments

Comments
 (0)