rdhabalia commented on a change in pull request #3240: timeout stuck 
producer/consumer operation request
URL: https://github.com/apache/pulsar/pull/3240#discussion_r243723467
 
 

 ##########
 File path: 
pulsar-client/src/main/java/org/apache/pulsar/client/impl/ClientCnx.java
 ##########
 @@ -668,6 +668,16 @@ SocketAddress serverAddrees() {
                 future.completeExceptionally(writeFuture.cause());
             }
         });
+        eventLoopGroup.schedule(() -> {
+            CompletableFuture<ProducerResponse> requestFuture = 
pendingRequests.remove(requestId);
+            if (requestFuture != null && !requestFuture.isDone()) {
+                log.warn("{} request {} timed out after {} ms", ctx.channel(), 
requestId, operationTimeoutMs);
+                future.completeExceptionally(
 
 Review comment:
   actually `requestFuture` and `future` both are same. I just correct by using 
`requestFuture` only.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to