In Poco::Net::FTPClientSession 2 of the 3 constructors can throw
_pControlSocket->setReceiveTimeout(_timeout); <--here
if (readWelcomeMessage)
{
receiveServerReadyReply(); <---here
}
else
{
_serverReady = true;
}
_pControlSocket->setReceiveTimeout(_timeout);<--here
if (!username.empty())
login(username, password); <--here
If the constructor throw the destructor is never called so we can have some memory leak because close() is never called
it's enough, for example, to create a socket on an http/https connection and pass it to the constructor: the receiveServerReadyReply will throw
In Poco::Net::FTPClientSession 2 of the 3 constructors can throw
If the constructor throw the destructor is never called so we can have some memory leak because close() is never called
it's enough, for example, to create a socket on an http/https connection and pass it to the constructor: the receiveServerReadyReply will throw