diff --git a/sdk-core/src/main/java/org/fisco/bcos/sdk/network/ChannelHandler.java b/sdk-core/src/main/java/org/fisco/bcos/sdk/network/ChannelHandler.java index 2577cc679..607051adf 100644 --- a/sdk-core/src/main/java/org/fisco/bcos/sdk/network/ChannelHandler.java +++ b/sdk-core/src/main/java/org/fisco/bcos/sdk/network/ChannelHandler.java @@ -163,4 +163,10 @@ protected void channelRead0(ChannelHandlerContext ctx, Message msg) { final ChannelHandlerContext ctxF = ctx; msgHandler.onMessage(ctxF, msg); } + + @Override + public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception { + logger.debug("exceptionCaught: ", cause); + this.channelInactive(ctx); + } }