OutputStream out = res.getOutputStream();
String sessionId = null;
ClientSocket stream = _loadBalancer.openSticky(sessionId, null);
boolean isValid = false;
if (stream == null) {
if (log.isLoggable(Level.FINE))
log.fine(this + " cannot open a stream from " + _loadBalancer);
res.sendError(503);
return;
}
try {
// fcgiSocket.setExpire(Alarm.getCurrentTime() + _keepaliveTimeout);
boolean isKeepalive = true;
long startRequestTime = Alarm.getCurrentTime();
if (handleRequest(req, res, stream, out, isKeepalive)) {
stream.free(startRequestTime);
stream = null;
}
} catch (Exception e) {
log.log(Level.WARNING, e.toString(), e);
} finally {
if (stream != null)
stream.close();
}
}