add the ability to set timeout during any EVENT, not just begin
authorfhanik <fhanik@13f79535-47bb-0310-9956-ffa450edef68>
Tue, 22 Jan 2008 17:33:32 +0000 (17:33 +0000)
committerfhanik <fhanik@13f79535-47bb-0310-9956-ffa450edef68>
Tue, 22 Jan 2008 17:33:32 +0000 (17:33 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@614268 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/coyote/http11/Http11NioProcessor.java

index 36e059d..0c57c7b 100644 (file)
@@ -751,7 +751,10 @@ public class Http11NioProcessor implements ActionHook {
                 NioEndpoint.KeyAttachment attach = (NioEndpoint.KeyAttachment)socket.getAttachment(false);
                 if (attach != null) {
                     attach.setComet(comet);
-                    if (!comet) {
+                    if (comet) {
+                        Integer comettimeout = (Integer) request.getAttribute("org.apache.tomcat.comet.timeout");
+                        if (comettimeout != null) attach.setTimeout(comettimeout.longValue());
+                    } else {
                         //reset the timeout
                         attach.setTimeout(endpoint.getSocketProperties().getSoTimeout());
                     }