Skip to content

Commit 3072354

Browse files
author
Stephane Landelle
committed
Fix NPE when re-scheduling read timeouts, close AsyncHttpClient#773
1 parent 8f53178 commit 3072354

File tree

4 files changed

+0
-12
lines changed

4 files changed

+0
-12
lines changed

providers/netty3/src/main/java/org/asynchttpclient/providers/netty3/request/timeout/ReadTimeoutTimerTask.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,5 @@ public void run(Timeout timeout) throws Exception {
6666
// otherwise, no need to reschedule: requestTimeout will happen sooner
6767
timeoutsHolder.readTimeout = null;
6868
}
69-
70-
// this task should be evacuated from the timer but who knows
71-
nettyResponseFuture = null;
7269
}
7370
}

providers/netty3/src/main/java/org/asynchttpclient/providers/netty3/request/timeout/RequestTimeoutTimerTask.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,5 @@ public void run(Timeout timeout) throws Exception {
4545
String message = "Request timed out to " + remoteAddress + " of " + requestTimeout + " ms";
4646
long age = millisTime() - nettyResponseFuture.getStart();
4747
expire(message, age);
48-
49-
// this task should be evacuated from the timer but who knows
50-
nettyResponseFuture = null;
5148
}
5249
}

providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/request/timeout/ReadTimeoutTimerTask.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,5 @@ public void run(Timeout timeout) throws Exception {
6767
// otherwise, no need to reschedule: requestTimeout will happen sooner
6868
timeoutsHolder.readTimeout = null;
6969
}
70-
71-
// this task should be evacuated from the timer but who knows
72-
nettyResponseFuture = null;
7370
}
7471
}

providers/netty4/src/main/java/org/asynchttpclient/providers/netty4/request/timeout/RequestTimeoutTimerTask.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,5 @@ public void run(Timeout timeout) throws Exception {
4646
String message = "Request timed out to " + remoteAddress + " of " + requestTimeout + " ms";
4747
long age = millisTime() - nettyResponseFuture.getStart();
4848
expire(message, age);
49-
50-
// this task should be evacuated from the timer but who knows
51-
nettyResponseFuture = null;
5249
}
5350
}

0 commit comments

Comments
 (0)