szetszwo commented on code in PR #748:
URL: https://github.com/apache/ratis/pull/748#discussion_r998104298


##########
ratis-netty/src/main/java/org/apache/ratis/netty/client/NettyClientStreamRpc.java:
##########
@@ -390,7 +442,15 @@ public CompletableFuture<DataStreamReply> 
streamAsync(DataStreamRequest request)
 
   @Override
   public void close() {
-    connection.close();
+    final boolean flush = outstandingRequests.shouldFlush(true, 0, 
SizeInBytes.ZERO);

Review Comment:
   Yes, we need to call `shouldFlush` to determine if there are requests which 
have been written but not yet flushed.  If we close the connection, the data 
won't be sent.



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

Reply via email to