Skip to content

Commit cbd2088

Browse files
committed
Start measuring the timeout immediately
1 parent 3c176c0 commit cbd2088

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/main/java/com/ning/http/client/providers/netty/NettyAsyncHttpProvider.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ public void operationComplete(ChannelFuture cf) {
462462
int delay = requestTimeout(config, future.getRequest().getPerRequestConfig());
463463
if (delay != -1 && !future.isDone() && !future.isCancelled()) {
464464
ReaperFuture reaperFuture = new ReaperFuture(channel, future);
465-
Future scheduledFuture = config.reaper().scheduleAtFixedRate(reaperFuture, delay, delay, TimeUnit.MILLISECONDS);
465+
Future scheduledFuture = config.reaper().scheduleAtFixedRate(reaperFuture, 0, delay, TimeUnit.MILLISECONDS);
466466
reaperFuture.setScheduledFuture(scheduledFuture);
467467
future.setReaperFuture(reaperFuture);
468468
}
@@ -1195,7 +1195,6 @@ public Object call() throws Exception {
11951195
Cookie c = AsyncHttpProviderUtils.parseCookie(cookieStr);
11961196
nBuilder.addOrReplaceCookie(c);
11971197
}
1198-
11991198

12001199
AsyncCallable ac = new AsyncCallable(future) {
12011200
public Object call() throws Exception {

0 commit comments

Comments
 (0)