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



##########
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 it throws IllegalStateException, it is bug that should be fixed.  
Just like assertion, we won't expect the code will work correctly if an 
assertion fails.




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