Set timeouts for FTP passive connections

Set send/receive timeouts for FTP passive connections
This commit is contained in:
Chris Berry-Porter 2019-09-02 10:46:12 +10:00
parent ef516fa767
commit 8e0a852716

View File

@ -441,6 +441,8 @@ StreamSocket FTPClientSession::passiveDataConnection(const std::string& command,
SocketAddress sa(sendPassiveCommand());
StreamSocket sock;
sock.connect(sa, _timeout);
sock.setReceiveTimeout(_timeout);
sock.setSendTimeout(_timeout);
std::string response;
int status = sendCommand(command, arg, response);
if (!isPositivePreliminary(status))