You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
The callers of HttpChannelState.onIdleTimeout() look for 2 data: a Runnable and a boolean.
For example in HttpConnection:
if (_httpChannel.getRequest() == null)
returntrue;
Runnabletask = _httpChannel.onIdleTimeout(timeout);
...
This is slightly racy, and HttpChannelState grabs a lock to check the internal state, so it could do the check on the existence of the request within the lock.
Also, there are difference between HTTP/1.1 and HTTP/2: in H1 there is just a check on the request, but in H2 there is a call to isRequestHandled() which may be equivalent, but the logic should be the same.
This issue is about 2 things:
Normalizing the logic across all HTTP versions
See if possible to return a null task to indicate to the caller to return true, so that we are not forced to make 2 calls to gather the task and the boolean.
The text was updated successfully, but these errors were encountered:
Jetty version(s)
12+
Description
The callers of
HttpChannelState.onIdleTimeout()
look for 2 data: a Runnable and a boolean.For example in
HttpConnection
:This is slightly racy, and
HttpChannelState
grabs a lock to check the internal state, so it could do the check on the existence of the request within the lock.Also, there are difference between HTTP/1.1 and HTTP/2: in H1 there is just a check on the request, but in H2 there is a call to
isRequestHandled()
which may be equivalent, but the logic should be the same.This issue is about 2 things:
null
task to indicate to the caller to returntrue
, so that we are not forced to make 2 calls to gather the task and the boolean.The text was updated successfully, but these errors were encountered: