just answered an AJP CPING.
If CPING works, mod_jk expects the main request
to work too. If we don't want to process the
main request we need to fail the CPING received
directly before.
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@
1175594 13f79535-47bb-0310-9956-
ffa450edef68
long socketRef = socket.getSocket().longValue();
Socket.setrbb(socketRef, inputBuffer);
Socket.setsbb(socketRef, outputBuffer);
+ boolean cping = false;
// Error flag
error = false;
recycle(true);
break;
}
+ cping = true;
if (Socket.send(socketRef, pongMessageArray, 0,
pongMessageArray.length) < 0) {
error = true;
}
}
- if (endpoint.isPaused()) {
+ if (!cping && endpoint.isPaused()) {
// 503 - Service unavailable
response.setStatus(503);
adapter.log(request, response, 0);
error = true;
}
+ cping = false;
// Process the request in the adapter
if (!error) {
this.socket = socket.getSocket();
long soTimeout = endpoint.getSoTimeout();
+ boolean cping = false;
// Error flag
error = false;
recycle(true);
break;
}
+ cping = true;
try {
output(pongMessageArray, 0, pongMessageArray.length);
} catch (IOException e) {
}
}
- if (endpoint.isPaused()) {
+ if (!cping && endpoint.isPaused()) {
// 503 - Service unavailable
response.setStatus(503);
adapter.log(request, response, 0);
error = true;
}
+ cping = false;
// Process the request in the adapter
if (!error) {
if (keepAliveTimeout > 0) {
soTimeout = socket.getSocket().getSoTimeout();
}
+ boolean cping = false;
// Error flag
error = false;
recycle(true);
break;
}
+ cping = true;
try {
output.write(pongMessageArray);
} catch (IOException e) {
}
}
- if (endpoint.isPaused()) {
+ if (!cping && endpoint.isPaused()) {
// 503 - Service unavailable
response.setStatus(503);
adapter.log(request, response, 0);
error = true;
}
+ cping = false;
// Process the request in the adapter
if (!error) {