Connector refactoring
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Wed, 22 Jun 2011 23:25:43 +0000 (23:25 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Wed, 22 Jun 2011 23:25:43 +0000 (23:25 +0000)
Another small step towards SocketWrapper for NIO

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1138680 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/coyote/ajp/AjpNioProtocol.java

index 7396517..6aadceb 100644 (file)
@@ -172,8 +172,7 @@ public class AjpNioProtocol extends AbstractAjpProtocol {
             NioChannel socket = socketWrapper.getSocket();
             AjpNioProcessor processor = connections.remove(socket);
 
-            NioEndpoint.KeyAttachment att = (NioEndpoint.KeyAttachment)socket.getAttachment(false);
-            att.setAsync(false); //no longer check for timeout
+            socketWrapper.setAsync(false); //no longer check for timeout
 
             try {
                 if (processor == null) {
@@ -201,7 +200,7 @@ public class AjpNioProtocol extends AbstractAjpProtocol {
                     // socket associated with the processor.
                     connections.put(socket, processor);
                     
-                    att.setAsync(true);
+                    socketWrapper.setAsync(true);
                 } else if (state == SocketState.OPEN){
                     // In keep-alive but between requests. OK to recycle
                     // processor. Continue to poll for the next request.