From: rjung Date: Sun, 19 Jun 2011 14:27:52 +0000 (+0000) Subject: No need to for addToPoller in APR HTTP. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=16bf40e17c5ab5031f257fee47210da7b6d478b3;p=tomcat7.0 No need to for addToPoller in APR HTTP. When returning SocketState.OPEN the socket is always added to the poller. Fixes some crashes due to putting the same socket twice in the poller. git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1137372 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/java/org/apache/coyote/http11/Http11AprProcessor.java b/java/org/apache/coyote/http11/Http11AprProcessor.java index 2f165977f..9926574c8 100644 --- a/java/org/apache/coyote/http11/Http11AprProcessor.java +++ b/java/org/apache/coyote/http11/Http11AprProcessor.java @@ -212,7 +212,6 @@ public class Http11AprProcessor extends AbstractHttp11Processor { boolean keptAlive = false; boolean openSocket = false; - boolean addToPoller = false; while (!error && keepAlive && !comet && !isAsync() && !endpoint.isPaused()) { @@ -232,7 +231,6 @@ public class Http11AprProcessor extends AbstractHttp11Processor { adapter.log(request, response, 0); error = true; } else { - addToPoller = true; break; } } @@ -350,10 +348,6 @@ public class Http11AprProcessor extends AbstractHttp11Processor { } else if (comet || isAsync()) { return SocketState.LONG; } else { - // Add the socket to the poller - if (addToPoller) { - ((AprEndpoint)endpoint).getPoller().add(socketRef); - } return (openSocket) ? SocketState.OPEN : SocketState.CLOSED; }