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() 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 // Do not wait for server response. This is contrary to the RFC, but
// some servers never send a response to a QUIT command. // some servers never send a response to a QUIT command.
} }
catch (exception&) catch (exception&)
{ {
// Not important // Not important
}
} }
m_socket->disconnect(); m_socket->disconnect();