Skip to content

Commit 638e2fa

Browse files
committed
Incremental changes for AsyncHttpClient#328. Resolution still in progress. Fewer false positives are present however with these changes and recent updates to Grizzly.
1 parent d9a218e commit 638e2fa

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

providers/grizzly/src/main/java/org/asynchttpclient/providers/grizzly/GrizzlyAsyncHttpProvider.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,7 @@ public DelayedExecutor.Resolver<Connection> getResolver() {
220220
return resolver;
221221
}
222222

223+
223224
// ------------------------------------------------------- Protected Methods
224225

225226

@@ -269,7 +270,7 @@ public long getTimeout(FilterChainContext ctx) {
269270
return requestTimeout;
270271
}
271272
}
272-
return timeout;
273+
return IdleTimeoutFilter.FOREVER;
273274
}
274275
};
275276
final IdleTimeoutFilter timeoutFilter = new IdleTimeoutFilter(timeoutExecutor,
@@ -484,8 +485,10 @@ public void updated(WriteResult result) {
484485
void timeout(final Connection c) {
485486

486487
final HttpTransactionContext context = HttpTransactionContext.get(c);
487-
HttpTransactionContext.set(c, null);
488-
context.abort(new TimeoutException("Timeout exceeded"));
488+
if (context != null) {
489+
HttpTransactionContext.set(c, null);
490+
context.abort(new TimeoutException("Timeout exceeded"));
491+
}
489492

490493
}
491494

0 commit comments

Comments
 (0)