[jetty-dev] [jira] (JETTY-1528) A miscarriage of justice bug about checkIdleTimestamp in SelectChannelEndPoint class
"TONG (JIRA)" <[email protected]> Wed, 27 Jun 2012 11:59:21 -0500 (CDT)
| Newsgroups | gmane.comp.java.jetty.general |
|---|---|
| Message-ID | <1935022848.17000.1340816361088.JavaMail.j2ee-jira@codehaus01.managed.contegix.com> |
TONG
created JETTY-1528
A miscarriage of justice bug about checkIdleTimestamp in SelectChannelEndPoint class
Issue Type:
Bug
Affects Versions:
7.1.0, 7.0.2
Assignee:
Unassigned
Created:
27/Jun/12 11:57 AM
Description:
The variable _idleTimestamp is shared in the selector and the connector.
When things happend like this:
1, _idleTimestamp is nonzero, _idleTimestamp!=0 is true.
2, _maxIdleTime!=0 is true.
3, the connector changed the _idleTimestamp to zero by call cancelIdle method.
4, now>(_idleTimestamp+_maxIdleTime) is true.
5, then the connect was closed.
I deal a lot of short http request in a long tcp connect. this will happen in a high probability.
/* ------------------------------------------------------------ */
public void checkIdleTimestamp(long now)
{
if (_idleTimestamp!=0 && _maxIdleTime!=0 && now>(_idleTimestamp+_maxIdleTime))
idleExpired();
}
modify this code like this may resole the problem:
/* ------------------------------------------------------------ */
public void checkIdleTimestamp(long now)
{
long idleTimestamp = _idleTimestamp;
if (idleTimestamp !=0 && _maxIdleTime!=0 && now>(idleTimestamp +_maxIdleTime))
idleExpired();
}
Project:
Jetty
Priority:
Major
Reporter:
TONG
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators .
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email