From: fhanik Date: Tue, 29 May 2007 22:13:26 +0000 (+0000) Subject: When using a comet connection, register the requested operations instead of the defau... X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=692c5c27e57498ff41383ce362d7658fc5a65598;p=tomcat7.0 When using a comet connection, register the requested operations instead of the default read git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@542674 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/java/org/apache/coyote/http11/Http11NioProtocol.java b/java/org/apache/coyote/http11/Http11NioProtocol.java index 53e858efa..dcd5f4e0f 100644 --- a/java/org/apache/coyote/http11/Http11NioProtocol.java +++ b/java/org/apache/coyote/http11/Http11NioProtocol.java @@ -670,7 +670,8 @@ public class Http11NioProtocol implements ProtocolHandler, MBeanRegistration } else { if (log.isDebugEnabled()) log.debug("Keeping processor["+result); //add correct poller events here based on Comet stuff - socket.getPoller().add(socket); + NioEndpoint.KeyAttachment att = (NioEndpoint.KeyAttachment)socket.getAttachment(false); + socket.getPoller().add(socket,att.getCometOps()); } } } @@ -711,7 +712,12 @@ public class Http11NioProtocol implements ProtocolHandler, MBeanRegistration // processor. if (log.isDebugEnabled()) log.debug("Not recycling ["+processor+"] Comet="+((NioEndpoint.KeyAttachment)socket.getAttachment(false)).getComet()); connections.put(socket, processor); - socket.getPoller().add(socket); + if (processor.comet) { + NioEndpoint.KeyAttachment att = (NioEndpoint.KeyAttachment)socket.getAttachment(false); + socket.getPoller().add(socket,att.getCometOps()); + } else { + socket.getPoller().add(socket); + } } else { recycledProcessors.offer(processor); }