From dd8f5fd296e8f92a2387c6219f6b60451f36bc86 Mon Sep 17 00:00:00 2001 From: fhanik Date: Tue, 29 May 2007 18:04:51 +0000 Subject: [PATCH] only notify the poller if it is done async, otherwise we don't need to, it will be done at the end of the request git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@542603 13f79535-47bb-0310-9956-ffa450edef68 --- java/org/apache/coyote/http11/Http11NioProcessor.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/java/org/apache/coyote/http11/Http11NioProcessor.java b/java/org/apache/coyote/http11/Http11NioProcessor.java index 9c042240b..dca4cb881 100644 --- a/java/org/apache/coyote/http11/Http11NioProcessor.java +++ b/java/org/apache/coyote/http11/Http11NioProcessor.java @@ -1227,11 +1227,17 @@ public class Http11NioProcessor implements ActionHook { NioEndpoint.KeyAttachment attach = (NioEndpoint.KeyAttachment)socket.getAttachment(false); attach.setCometOps(attach.getCometOps()|interest); //notify poller if not on a tomcat thread + RequestInfo rp = request.getRequestProcessor(); + if ( rp.getStage() != org.apache.coyote.Constants.STAGE_SERVICE ) + socket.getPoller().cometInterest(socket); } else if (actionCode == ActionCode.ACTION_COMET_UNREGISTER) { int interest = getPollerInterest(param); NioEndpoint.KeyAttachment attach = (NioEndpoint.KeyAttachment)socket.getAttachment(false); attach.setCometOps(attach.getCometOps()& (~interest)); //notify poller if not on a tomcat thread + RequestInfo rp = request.getRequestProcessor(); + if ( rp.getStage() != org.apache.coyote.Constants.STAGE_SERVICE ) + socket.getPoller().cometInterest(socket); } else if (actionCode == ActionCode.ACTION_COMET_CONFIGURE) { } -- 2.11.0