fix: timeout does not work when ftp passive connect (#2463)

This commit is contained in:
fenghao119 2018-09-13 15:09:28 +08:00 committed by Aleksandar Fabijanic
parent 43f1d5617a
commit e7e90e2465

View File

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