You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2011/04/13 22:22:45 UTC

DO NOT REPLY [Bug 51058] New: AsyncContext.setTimeout() doesn't work as described for Async requests

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


DO NOT REPLY [Bug 51058] AsyncContext.setTimeout() doesn't work as described for Async requests

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51058

Chris <ch...@blaze.io> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #26884|0                           |1
           is patch|                            |

-- 
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


DO NOT REPLY [Bug 51058] AsyncContext.setTimeout() doesn't work as described for Async requests

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=51058

Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #1 from Mark Thomas <ma...@apache.org> 2011-04-16 19:48:30 EDT ---
This has been fixed in 7.0.x and will be included in 7.0.13 onwards.

Thanks for the patch. It was inverted but it was simple enough to figure out
what you were getting at.

-- 
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