1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2024-06-25 22:53:22 +00:00

Handle connection errors on websockets

This commit is contained in:
Devilholk 2019-01-22 11:11:25 +00:00 committed by SquidDev
parent d173787a94
commit e41377f862

View File

@ -161,7 +161,10 @@ protected void initChannel( SocketChannel ch )
}
} )
.remoteAddress( socketAddress )
.connect();
.connect()
.addListener( c -> {
if( !c.isSuccess() ) failure( c.cause().getMessage() );
} );
// Do an additional check for cancellation
checkClosed();