Fixed SMTP disconnection error caused by handshake failure.
This commit is contained in:
parent
24eff0069b
commit
b6469f68a8
@ -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();
|
||||||
|
Loading…
Reference in New Issue
Block a user