recycle();
}
- // Add the socket to the poller
- if (!error && !endpoint.isPaused()) {
- if (!isAsync()) {
- ((AprEndpoint)endpoint).getPoller().add(socketRef);
- }
- }
-
rp.setStage(org.apache.coyote.Constants.STAGE_ENDED);
if (error || endpoint.isPaused()) {
} else if (isAsync()) {
return SocketState.LONG;
} else {
+ // Add the socket to the poller
+ ((AprEndpoint)endpoint).getPoller().add(socketRef);
return SocketState.OPEN;
}
}
boolean keptAlive = false;
boolean openSocket = false;
+ boolean addToPoller = false;
while (!error && keepAlive && !comet && !isAsync() && !endpoint.isPaused()) {
// (long keepalive), so that the processor should be recycled
// and the method should return true
openSocket = true;
- // Add the socket to the poller
- ((AprEndpoint)endpoint).getPoller().add(socketRef);
if (endpoint.isPaused()) {
// 503 - Service unavailable
response.setStatus(503);
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;
}
Remove superfluous quotes from thread names for connection pools.
(rjung)
</fix>
+ <fix>
+ Fix crash observed during pausing the connector when using APR.
+ Only add socket to poller if we are sure we don't close it later.
+ (rjung)
+ </fix>
</changelog>
</subsection>
<subsection name="Cluster">