From: fhanik Date: Tue, 22 Jan 2008 17:33:32 +0000 (+0000) Subject: add the ability to set timeout during any EVENT, not just begin X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=c103ac8d6599e6e51274ee48259227ad106964c5;p=tomcat7.0 add the ability to set timeout during any EVENT, not just begin git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@614268 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/java/org/apache/coyote/http11/Http11NioProcessor.java b/java/org/apache/coyote/http11/Http11NioProcessor.java index 36e059d5f..0c57c7bcf 100644 --- a/java/org/apache/coyote/http11/Http11NioProcessor.java +++ b/java/org/apache/coyote/http11/Http11NioProcessor.java @@ -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()); }