fixes for FTPSClientSession

This commit is contained in:
Günter Obiltschnig
2020-01-23 13:29:54 +01:00
parent a106dcbf80
commit 878b8bbeca
20 changed files with 750 additions and 327 deletions

View File

@@ -331,7 +331,7 @@ protected:
static bool isTransientNegative(int status);
static bool isPermanentNegative(int status);
std::string extractPath(const std::string& response);
StreamSocket establishDataConnection(const std::string& command, const std::string& arg);
virtual StreamSocket establishDataConnection(const std::string& command, const std::string& arg);
StreamSocket activeDataConnection(const std::string& command, const std::string& arg);
StreamSocket passiveDataConnection(const std::string& command, const std::string& arg);
void sendPortCommand(const SocketAddress& addr);

View File

@@ -198,8 +198,13 @@ void FTPClientSession::logout()
if (_isLoggedIn)
{
try { endTransfer(); }
catch (...) { }
try
{
endTransfer();
}
catch (...)
{
}
_isLoggedIn = false;
std::string response;
sendCommand("QUIT", response);