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