mirror of
https://github.com/pocoproject/poco.git
synced 2024-12-14 11:06:57 +01:00
Merge pull request #2778 from chrisbp/ftp-passive-timeout-fix
Set timeouts for FTP passive connections
This commit is contained in:
commit
c4ad84b10b
@ -441,6 +441,8 @@ StreamSocket FTPClientSession::passiveDataConnection(const std::string& command,
|
|||||||
SocketAddress sa(sendPassiveCommand());
|
SocketAddress sa(sendPassiveCommand());
|
||||||
StreamSocket sock;
|
StreamSocket sock;
|
||||||
sock.connect(sa, _timeout);
|
sock.connect(sa, _timeout);
|
||||||
|
sock.setReceiveTimeout(_timeout);
|
||||||
|
sock.setSendTimeout(_timeout);
|
||||||
std::string response;
|
std::string response;
|
||||||
int status = sendCommand(command, arg, response);
|
int status = sendCommand(command, arg, response);
|
||||||
if (!isPositivePreliminary(status))
|
if (!isPositivePreliminary(status))
|
||||||
|
Loading…
Reference in New Issue
Block a user