feat: 优化websocket

Signed-off-by: MiaoWoo <admin@yumc.pw>
This commit is contained in:
2021-10-25 15:56:23 +08:00
parent ed588e4502
commit 867fc802ec
5 changed files with 9 additions and 7 deletions

View File

@@ -100,9 +100,11 @@ export class NettyWebSocket extends Transport {
handler.handshakeFuture.addListener(new ChannelFutureListener((future: any) => {
try {
future.sync()
// only trigger onconnect when not have error
this.onconnect({})
} catch (error) {
this.onerror({ error })
// ignore error exceptionCaught from handler
// this.onerror({ error })
}
}))
}))