File tree Expand file tree Collapse file tree
src/main/java/org/java_websocket/client Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2828import java .io .IOException ;
2929import java .io .InputStream ;
3030import java .io .OutputStream ;
31+ import java .lang .reflect .InvocationTargetException ;
3132import java .net .InetSocketAddress ;
3233import java .net .Proxy ;
3334import java .net .Socket ;
@@ -452,6 +453,15 @@ public void run() {
452453 onWebsocketError ( engine , e );
453454 engine .closeConnection ( CloseFrame .NEVER_CONNECTED , e .getMessage () );
454455 return ;
456+ } catch (InternalError e ) {
457+ // https://bugs.openjdk.java.net/browse/JDK-8173620
458+ if (e .getCause () instanceof InvocationTargetException && e .getCause ().getCause () instanceof IOException ) {
459+ IOException cause = (IOException ) e .getCause ().getCause ();
460+ onWebsocketError (engine , cause );
461+ engine .closeConnection (CloseFrame .NEVER_CONNECTED , cause .getMessage ());
462+ return ;
463+ }
464+ throw e ;
455465 }
456466
457467 writeThread = new Thread ( new WebsocketWriteThread (this ) );
You can’t perform that action at this time.
0 commit comments