} 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());
// 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);
}
}
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());