FTPClientSession::close() error? #1880

This commit is contained in:
Alex Fabijanic
2017-10-30 11:19:54 -05:00
parent 1a18621ff8
commit 57bc179db5
3 changed files with 11 additions and 7 deletions

View File

@@ -181,20 +181,24 @@ void FTPClientSession::logout()
{
try { endTransfer(); }
catch (...) { }
_isLoggedIn = false;
std::string response;
sendCommand("QUIT", response);
_isLoggedIn = false;
}
}
void FTPClientSession::close()
{
logout();
_pControlSocket->close();
delete _pControlSocket;
_pControlSocket = 0;
try { logout(); }
catch (...) {}
_serverReady = false;
if (_pControlSocket)
{
_pControlSocket->close();
delete _pControlSocket;
_pControlSocket = 0;
}
}