mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-01-12 02:10:30 +00:00
Handle connection errors on websockets
This commit is contained in:
parent
d173787a94
commit
e41377f862
@ -161,7 +161,10 @@ public class Websocket extends Resource<Websocket>
|
|||||||
}
|
}
|
||||||
} )
|
} )
|
||||||
.remoteAddress( socketAddress )
|
.remoteAddress( socketAddress )
|
||||||
.connect();
|
.connect()
|
||||||
|
.addListener( c -> {
|
||||||
|
if( !c.isSuccess() ) failure( c.cause().getMessage() );
|
||||||
|
} );
|
||||||
|
|
||||||
// Do an additional check for cancellation
|
// Do an additional check for cancellation
|
||||||
checkClosed();
|
checkClosed();
|
||||||
|
Loading…
Reference in New Issue
Block a user