tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 51058] New: AsyncContext.setTimeout() doesn't work as described for Async requests
Date Wed, 13 Apr 2011 20:22:45 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=51058

           Summary: AsyncContext.setTimeout() doesn't work as described
                    for Async requests
           Product: Tomcat 7
           Version: 7.0.11
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Servlet & JSP API
        AssignedTo: dev@tomcat.apache.org
        ReportedBy: chris@blaze.io


Created an attachment (id=26884)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=26884)
Suggested patch

The Javadoc for javax.servlet.AsyncContext.setTimeout() and
javax.servlet.AsyncContext.getTimeout() states that:

"A timeout value of zero or less indicates no timeout."

However, this doesn't seem to be the case. A timeout value of zero or less will
result in an immediate timeout.

Looking through the code, I think the timeout is enforced in
org.apache.tomcat.util.net.AprEndpoint.AsyncTimeout.run() or
org.apache.tomcat.util.net.JIoEndpoint.AsyncTimeout.run().

I've attached a patch which changes the timeout logic. I believe
org.apache.tomcat.util.net.NioEndpoint.timeout() also needs a change, but that
one's not as clear to me.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message