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
boolean keptAlive = false;
boolean openSocket = false;
- boolean addToPoller = false;
while (!error && keepAlive && !comet && !isAsync() && !endpoint.isPaused()) {
adapter.log(request, response, 0);
error = true;
} else {
- addToPoller = true;
break;
}
}
} 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;
}