kezhuw commented on code in PR #2236:
URL: https://github.com/apache/zookeeper/pull/2236#discussion_r2010479529


##########
zookeeper-server/src/main/java/org/apache/zookeeper/server/NettyServerCnxn.java:
##########
@@ -366,7 +366,12 @@ private void appendToQueuedBuffer(ByteBuf buf) {
     void processMessage(ByteBuf buf) {
         checkIsInEventLoop("processMessage");
         LOG.debug("0x{} queuedBuffer: {}", Long.toHexString(sessionId), 
queuedBuffer);
-
+        
+        if (closingChannel) {
+            LOG.info("Closing connection to {}", getRemoteSocketAddress());
+            return;
+        }
+        

Review Comment:
   ```suggestion
   
           if (closingChannel) {
               LOG.debug("Drop incoming message during connection closing for 
session 0x{}", Long.toHexString(sessionId));
               return;
           }
   
   ```
   
   I am not sure `getRemoteSocketAddress` is safe after channel closed. Also, 
postmortem log probably don't deserve `LOG.info`.



-- 
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: notifications-unsubscr...@zookeeper.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to