From 620409b8c30895ae7b7a809837ee54f534743a1f Mon Sep 17 00:00:00 2001 From: markt Date: Tue, 12 Oct 2010 14:09:59 +0000 Subject: [PATCH] Stop async requests hanging - side effect of r1006358 git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1021780 13f79535-47bb-0310-9956-ffa450edef68 --- java/org/apache/coyote/http11/Http11AprProtocol.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/java/org/apache/coyote/http11/Http11AprProtocol.java b/java/org/apache/coyote/http11/Http11AprProtocol.java index 100eaf0ea..05edd52f0 100644 --- a/java/org/apache/coyote/http11/Http11AprProtocol.java +++ b/java/org/apache/coyote/http11/Http11AprProtocol.java @@ -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()); -- 2.11.0