Merge pull request #2778 from chrisbp/ftp-passive-timeout-fix

Set timeouts for FTP passive connections
This commit is contained in:
Günter Obiltschnig 2019-10-31 14:38:41 +01:00 committed by GitHub
commit c4ad84b10b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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))