azexcy commented on code in PR #23627:
URL: https://github.com/apache/shardingsphere/pull/23627#discussion_r1073278244


##########
proxy/frontend/core/src/main/java/org/apache/shardingsphere/proxy/frontend/netty/CDCChannelInboundHandler.java:
##########
@@ -79,27 +85,40 @@ public void channelInactive(final ChannelHandlerContext 
ctx) {
         ctx.channel().attr(CONNECTION_CONTEXT_KEY).set(null);
     }
     
+    @Override
+    public void exceptionCaught(final ChannelHandlerContext ctx, final 
Throwable cause) {

Review Comment:
   The clean method at `channelInactive`, maybe just close channl here
   
   ```
       @Override
       public void channelInactive(final ChannelHandlerContext ctx) {
           CDCConnectionContext connectionContext = 
ctx.channel().attr(CONNECTION_CONTEXT_KEY).get();
           if (null != connectionContext.getJobId()) {
               backendHandler.stopSubscription(connectionContext.getJobId());
           }
           ctx.channel().attr(CONNECTION_CONTEXT_KEY).set(null);
       }
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to