runzhiwang commented on a change in pull request #267:
URL: https://github.com/apache/incubator-ratis/pull/267#discussion_r520968321



##########
File path: 
ratis-netty/src/main/java/org/apache/ratis/netty/server/NettyServerStreamRpc.java
##########
@@ -429,10 +464,9 @@ private void read(ChannelHandlerContext ctx, 
DataStreamRequestByteBuf request) {
           } else {
             throw new IllegalStateException(this + ": Unexpected type " + 
request.getType() + ", request=" + request);
           }
+          buf.release();

Review comment:
       If we throw IllegalStateException at previous line, we have no chance to 
release buf here.




----------------------------------------------------------------
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.

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


Reply via email to