mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-30 13:47:10 +01:00
fix: timeout does not work when ftp passive connect (#2463)
This commit is contained in:
committed by
Aleksandar Fabijanic
parent
43f1d5617a
commit
e7e90e2465
@@ -439,7 +439,8 @@ StreamSocket FTPClientSession::activeDataConnection(const std::string& command,
|
|||||||
StreamSocket FTPClientSession::passiveDataConnection(const std::string& command, const std::string& arg)
|
StreamSocket FTPClientSession::passiveDataConnection(const std::string& command, const std::string& arg)
|
||||||
{
|
{
|
||||||
SocketAddress sa(sendPassiveCommand());
|
SocketAddress sa(sendPassiveCommand());
|
||||||
StreamSocket sock(sa);
|
StreamSocket sock;
|
||||||
|
sock.connect(sa, _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))
|
||||||
|
|||||||
Reference in New Issue
Block a user