Skip to content

Commit 2d6b22a

Browse files
author
Stephane Landelle
committed
When debug is enabled, Netty ConnectListener erroneously consumes a retry token, close AsyncHttpClient#436
1 parent 18b73b7 commit 2d6b22a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

providers/netty/src/main/java/org/asynchttpclient/providers/netty/request/NettyConnectListener.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,9 @@ public void onFutureSuccess(final Channel channel) throws ConnectException {
7474

7575
public void onFutureFailure(Channel channel, Throwable cause) {
7676

77-
logger.debug("Trying to recover a dead cached channel {} with a retry value of {} ", channel, future.canRetry());
78-
if (future.canRetry() && cause != null
77+
boolean canRetry = future.canRetry();
78+
logger.debug("Trying to recover a dead cached channel {} with a retry value of {} ", channel, canRetry);
79+
if (canRetry && cause != null
7980
&& (NettyResponseFutures.abortOnDisconnectException(cause) || cause instanceof ClosedChannelException || future.getState() != NettyResponseFuture.STATE.NEW)) {
8081

8182
logger.debug("Retrying {} ", future.getNettyRequest());

0 commit comments

Comments
 (0)