kezhuw commented on PR #2236: URL: https://github.com/apache/zookeeper/pull/2236#issuecomment-2746005109
> The root cause for the error throw is caused by follow logic: when closing the server. the follow code don't have chance to get executed: bb = ByteBuffer.allocate(len); //line 552 so the remain message (body) will be taken as the head msg again and parsed again as the header. then body length is not right now. sometimes it over the max size. So I move the server status check before the length check. Seems that there are multiple incoming packets during server close. Since `processMessage` is called sequential in event loop thread, I would suggest to guard against `closingChannel` before decoding the packet inside `processMessage`. That is we should not even reading the packet. -- 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]
