From c103ac8d6599e6e51274ee48259227ad106964c5 Mon Sep 17 00:00:00 2001 From: fhanik Date: Tue, 22 Jan 2008 17:33:32 +0000 Subject: [PATCH] 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 --- java/org/apache/coyote/http11/Http11NioProcessor.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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()); } -- 2.11.0