File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
client/src/main/java/org/asynchttpclient/netty/request Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -360,9 +360,13 @@ private void scheduleRequestTimeout(NettyResponseFuture<?> nettyResponseFuture)
360
360
}
361
361
362
362
private void scheduleReadTimeout (NettyResponseFuture <?> nettyResponseFuture ) {
363
- nettyResponseFuture .touch ();
364
363
TimeoutsHolder timeoutsHolder = nettyResponseFuture .getTimeoutsHolder ();
365
- timeoutsHolder .startReadTimeout ();
364
+ if (timeoutsHolder != null ) {
365
+ // on very fast requests, it's entirely possible that the response has already been completed
366
+ // by the time we try to schedule the read timeout
367
+ nettyResponseFuture .touch ();
368
+ timeoutsHolder .startReadTimeout ();
369
+ }
366
370
}
367
371
368
372
public void abort (Channel channel , NettyResponseFuture <?> future , Throwable t ) {
You can’t perform that action at this time.
0 commit comments