Skip to content

Commit cdfe097

Browse files
jiafu1115kezhuw
authored andcommitted
ZOOKEEPER-4907: Stop client packets processing after server channel closed
Reviewers: kezhuw, tisonkun Author: jiafu1115 Closes #2236 from jiafu1115/jiafu1115-patch-1 (cherry picked from commit 6e4ec27) Signed-off-by: Kezhu Wang <[email protected]>
1 parent 599750d commit cdfe097

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Diff for: zookeeper-server/src/main/java/org/apache/zookeeper/server/NettyServerCnxn.java

+5
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,11 @@ void processMessage(ByteBuf buf) {
367367
checkIsInEventLoop("processMessage");
368368
LOG.debug("0x{} queuedBuffer: {}", Long.toHexString(sessionId), queuedBuffer);
369369

370+
if (closingChannel) {
371+
LOG.debug("Drop incoming message during connection closing for session 0x{}", Long.toHexString(sessionId));
372+
return;
373+
}
374+
370375
if (LOG.isTraceEnabled()) {
371376
LOG.trace("0x{} buf {}", Long.toHexString(sessionId), ByteBufUtil.hexDump(buf));
372377
}

0 commit comments

Comments
 (0)