Stop async requests hanging - side effect of r1006358
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Tue, 12 Oct 2010 14:09:59 +0000 (14:09 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Tue, 12 Oct 2010 14:09:59 +0000 (14:09 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1021780 13f79535-47bb-0310-9956-ffa450edef68

java/org/apache/coyote/http11/Http11AprProtocol.java

index 100eaf0..05edd52 100644 (file)
@@ -330,6 +330,7 @@ public class Http11AprProtocol extends AbstractHttp11Protocol {
                     } finally {
                         if (state != SocketState.LONG) {
                             connections.remove(socket);
+                            socket.setAsync(false);
                             recycledProcessors.offer(processor);
                             if (state == SocketState.OPEN) {
                                 ((AprEndpoint)proto.endpoint).getPoller().add(socket.getSocket().longValue());
@@ -364,6 +365,7 @@ public class Http11AprProtocol extends AbstractHttp11Protocol {
                     // Need to make socket available for next processing cycle
                     // but no need for the poller
                     connections.put(socket, processor);
+                    socket.setAsync(true);
                 } else {
                     recycledProcessors.offer(processor);
                 }
@@ -418,6 +420,7 @@ public class Http11AprProtocol extends AbstractHttp11Protocol {
                     }
                     if (state != SocketState.LONG && state != SocketState.ASYNC_END) {
                         connections.remove(socket);
+                        socket.setAsync(false);
                         recycledProcessors.offer(result);
                         if (state == SocketState.OPEN) {
                             ((AprEndpoint)proto.endpoint).getPoller().add(socket.getSocket().longValue());