-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Closed
Labels
Milestone
Description
I probably found a problem in close function of FTPClientSession, here is the function:
void FTPClientSession::close()
{
logout();
_pControlSocket->close();
delete _pControlSocket;
_pControlSocket = 0;
_serverReady = false;
}
it's called in destructor of FTPClientSession as:
try
{
close();
}
catch (...)
{
}
So it's safe: the problem here is in the logout function inside , because it does something like
try { endTransfer(); }
catch (...) { }
std::string response;
sendCommand("QUIT", response);
_isLoggedIn = false;
If, as in my environment, the sendCommand throw exception because socket is broken or whatever, you end up in FTPClientSession::close() exit too early without do the close of the FTP control socket.
Probably in close() function logout should be under try catch
Reactions are currently unavailable