alex-plekhanov commented on a change in pull request #8480:
URL: https://github.com/apache/ignite/pull/8480#discussion_r526878889



##########
File path: 
modules/core/src/main/java/org/apache/ignite/internal/client/thin/TcpClientChannel.java
##########
@@ -303,7 +312,7 @@ private ClientRequestFuture send(ClientOperation op, 
Consumer<PayloadOutputChann
     private <T> T receive(ClientRequestFuture pendingReq, 
Function<PayloadInputChannel, T> payloadReader)
         throws ClientException {
         try {
-            byte[] payload = pendingReq.get();
+            byte[] payload = timeout > 0 ? pendingReq.get(timeout) : 
pendingReq.get();

Review comment:
       `receiveAsync` calls `get()` on the future only after `pendingReq` 
completion.
   Also, `CompletableFuture` is returned to the user, so the user can use 
`get()` method with a timeout to gain the same result.




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