only notify the poller if it is done async, otherwise we don't need to, it will be...
authorfhanik <fhanik@13f79535-47bb-0310-9956-ffa450edef68>
Tue, 29 May 2007 18:04:51 +0000 (18:04 +0000)
committerfhanik <fhanik@13f79535-47bb-0310-9956-ffa450edef68>
Tue, 29 May 2007 18:04:51 +0000 (18:04 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@542603 13f79535-47bb-0310-9956-ffa450edef68

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

index 9c04224..dca4cb8 100644 (file)
@@ -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) {
         }