Fixed SMTP disconnection error caused by handshake failure.

This commit is contained in:
Vincent Richard 2014-01-19 16:36:06 +01:00
parent 24eff0069b
commit b6469f68a8

View File

@ -522,16 +522,19 @@ void SMTPConnection::disconnect()
void SMTPConnection::internalDisconnect()
{
try
if (isConnected())
{
sendRequest(SMTPCommand::QUIT());
try
{
sendRequest(SMTPCommand::QUIT());
// Do not wait for server response. This is contrary to the RFC, but
// some servers never send a response to a QUIT command.
}
catch (exception&)
{
// Not important
// Do not wait for server response. This is contrary to the RFC, but
// some servers never send a response to a QUIT command.
}
catch (exception&)
{
// Not important
}
}
m_socket->disconnect();