client connection after the previous request completes.
DOC_END
+NAME: ftp_client_idle_timeout
+TYPE: time_t
+LOC: Config.Timeout.ftpClientIdle
+DEFAULT: 30 minutes
+DOC_START
+ How long to wait for an FTP request on a connection to Squid ftp_port.
+ Many FTP clients do not deal with idle connection closures well,
+ necessitating a longer default timeout than client_idle_pconn_timeout
+ used for incoming HTTP requests.
+DOC_END
+
NAME: client_lifetime
COMMENT: time-units
TYPE: time_t
typedef CommCbMemFunT<ConnStateData, CommTimeoutCbParams> TimeoutDialer;
AsyncCall::Pointer timeoutCall = JobCallback(33, 5,
TimeoutDialer, this, ConnStateData::requestTimeout);
- commSetConnTimeout(clientConnection, Config.Timeout.clientIdlePconn, timeoutCall);
+ const int timeout = isFtp ? Config.Timeout.ftpClientIdle :
+ Config.Timeout.clientIdlePconn;
+ commSetConnTimeout(clientConnection, timeout, timeoutCall);
readSomeData();
/** Please don't do anything with the FD past here! */
FtpChangeState(ConnStateData *connState, const ConnStateData::FtpState newState, const char *reason)
{
assert(connState);
- debugs(33, 3, "client state was " << connState->ftp.state << ", now " <<
- newState << " because " << reason);
- connState->ftp.state = newState;
+ if (connState->ftp.state == newState) {
+ debugs(33, 3, "client state unchanged at " << connState->ftp.state <<
+ " because " << reason);
+ connState->ftp.state = newState;
+ } else {
+ debugs(33, 3, "client state was " << connState->ftp.state <<
+ ", now " << newState << " because " << reason);
+ connState->ftp.state = newState;
+ }
}
/** Parse an FTP request