* responses
* @throws IOException error during an I/O operation
*/
- public void process(Socket socket)
+ public void process(Socket theSocket)
throws IOException {
RequestInfo rp = request.getRequestProcessor();
rp.setStage(org.apache.coyote.Constants.STAGE_PARSE);
localPort = -1;
// Setting up the I/O
- this.socket = socket;
+ this.socket = theSocket;
inputBuffer.setInputStream(socket.getInputStream());
outputBuffer.setOutputStream(socket.getOutputStream());
keepAlive = true;
int keepAliveLeft = maxKeepAliveRequests;
- int soTimeout = socket.getSoTimeout();
- int oldSoTimeout = soTimeout;
+ int soTimeout = endpoint.getSoTimeout();
int threadRatio = (endpoint.getCurrentThreadsBusy() * 100)
/ endpoint.getMaxThreads();
keepAliveLeft = 1;
}
- if (soTimeout != oldSoTimeout) {
- try {
- socket.setSoTimeout(soTimeout);
- } catch (Throwable t) {
- log.debug(sm.getString("http11processor.socket.timeout"), t);
- error = true;
- }
+ try {
+ socket.setSoTimeout(soTimeout);
+ } catch (Throwable t) {
+ log.debug(sm.getString("http11processor.socket.timeout"), t);
+ error = true;
}
boolean keptAlive = false;
inputBuffer.parseRequestLine();
request.setStartTime(System.currentTimeMillis());
keptAlive = true;
- if (!disableUploadTimeout) {
+ if (disableUploadTimeout) {
+ socket.setSoTimeout(soTimeout);
+ } else {
socket.setSoTimeout(timeout);
}
inputBuffer.parseHeaders();