guohao-rosicky commented on code in PR #1064:
URL: https://github.com/apache/ratis/pull/1064#discussion_r1561937201


##########
ratis-netty/src/main/java/org/apache/ratis/netty/client/NettyClientStreamRpc.java:
##########
@@ -455,26 +454,23 @@ public CompletableFuture<DataStreamReply> 
streamAsync(DataStreamRequest request)
           flushRequestCountMin, flushRequestBytesMin, request)? 
channel::writeAndFlush: channel::write;
       channelFuture = writeMethod.apply(request);
     }
+
+    final TimeDuration timeout = isClose ? closeTimeout : requestTimeout;
+    replyEntry.scheduleTimeout(() -> channel.eventLoop().schedule(() -> {

Review Comment:
   Thanks @szetszwo work on this. I think about this part of the code like this:
   
   After the client sends successfully, then wait for the server's return, the 
timeout time is to detect the timeout of the server's return, so I start the 
timeout listener after the client sends the request successfully. So I started 
the timeout listener after the client sent the request successfully, and 
canceled the timeout listener after the server returned successfully.



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