Skip to content

Commit faa6fca

Browse files
committed
nit after merging AsyncHttpClient#1150
1 parent a57bf47 commit faa6fca

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

client/src/main/java/org/asynchttpclient/netty/NettyResponseFuture.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ public boolean reuseChannel() {
425425
return reuseChannel;
426426
}
427427

428-
public boolean incRetryAndCheck() {
428+
public boolean incrementRetryAndCheck() {
429429
return maxRetry > 0 && CURRENT_RETRY_UPDATER.incrementAndGet(this) <= maxRetry;
430430
}
431431

client/src/main/java/org/asynchttpclient/netty/channel/NettyConnectListener.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ public void onFailure(Channel channel, Throwable cause) {
120120
//beware, channel can be null
121121
abortChannelPreemption();
122122

123-
boolean canRetry = future.incRetryAndCheck();
123+
boolean canRetry = future.incrementRetryAndCheck();
124124
LOGGER.debug("Trying to recover from failing to connect channel {} with a retry value of {} ", channel, canRetry);
125125
if (canRetry//
126126
&& cause != null // FIXME when can we have a null cause?

client/src/main/java/org/asynchttpclient/netty/request/NettyRequestSender.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ public void abort(Channel channel, NettyResponseFuture<?> future, Throwable t) {
396396
public void handleUnexpectedClosedChannel(Channel channel, NettyResponseFuture<?> future) {
397397
if (future.isDone()) {
398398
channelManager.closeChannel(channel);
399-
} else if (future.incRetryAndCheck() && retry(future)) {
399+
} else if (future.incrementRetryAndCheck() && retry(future)) {
400400
future.pendingException = null;
401401
} else {
402402
abort(channel, future, future.pendingException != null ? future.pendingException : RemotelyClosedException.INSTANCE);
@@ -447,7 +447,7 @@ public boolean applyIoExceptionFiltersAndReplayRequest(NettyResponseFuture<?> fu
447447
}
448448
}
449449

450-
if (fc.replayRequest() && future.canBeReplayed() && future.incRetryAndCheck()) {
450+
if (fc.replayRequest() && future.incrementRetryAndCheck() && future.canBeReplayed()) {
451451
replayRequest(future, fc, channel);
452452
replayed = true;
453453
}

0 commit comments

Comments
 (0)