-
Notifications
You must be signed in to change notification settings - Fork 2k
Closed
Labels
BugFor general bugs on Jetty sideFor general bugs on Jetty side
Description
Jetty version(s)
12+
Description
The callers of HttpChannelState.onIdleTimeout()
look for 2 data: a Runnable and a boolean.
For example in HttpConnection
:
if (_httpChannel.getRequest() == null)
return true;
Runnable task = _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 returntrue
, so that we are not forced to make 2 calls to gather the task and the boolean.
Metadata
Metadata
Assignees
Labels
BugFor general bugs on Jetty sideFor general bugs on Jetty side