From 7f3f2d20cb9fb46ffda79865c0e289dd450aea40 Mon Sep 17 00:00:00 2001 From: fhanik Date: Mon, 28 May 2007 14:18:04 +0000 Subject: [PATCH] configure can be called as long as we are on a tomcat thread, not in the begin stage git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@542235 13f79535-47bb-0310-9956-ffa450edef68 --- java/org/apache/catalina/connector/CometEventImpl.java | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/java/org/apache/catalina/connector/CometEventImpl.java b/java/org/apache/catalina/connector/CometEventImpl.java index 9828afde5..1577296e6 100644 --- a/java/org/apache/catalina/connector/CometEventImpl.java +++ b/java/org/apache/catalina/connector/CometEventImpl.java @@ -119,13 +119,11 @@ public class CometEventImpl implements CometEvent { return response.getResponse(); } - public void setTimeout(int timeout) throws IOException, ServletException, - UnsupportedOperationException { + public void setTimeout(int timeout) throws IOException, ServletException,UnsupportedOperationException { + //this check should get removed as soon as connection timeout is implemented everywhere. if (request.getAttribute("org.apache.tomcat.comet.timeout.support") == Boolean.TRUE) { checkWorkerThread(); - Integer to = new Integer(timeout); - request.action(ActionCode.ACTION_COMET_TIMEOUT,to); - //request.setAttribute("org.apache.tomcat.comet.timeout", to); + request.action(ActionCode.ACTION_COMET_TIMEOUT,new Integer(timeout)); } else { throw new UnsupportedOperationException(); } @@ -142,9 +140,6 @@ public class CometEventImpl implements CometEvent { public void configure(CometEvent.CometConfiguration... options) throws IOException, IllegalStateException { checkWorkerThread(); - if (getEventType()!=EventType.BEGIN) { - throw new IllegalStateException("Configure can only be called during the BEGIN event."); - } throw new UnsupportedOperationException(); } -- 2.11.0