diff options
author | Vincent Richard <[email protected]> | 2014-01-19 15:36:06 +0000 |
---|---|---|
committer | Vincent Richard <[email protected]> | 2014-01-19 15:36:06 +0000 |
commit | b6469f68a8c61da02d440cdd022c17cd8cdaeeaa (patch) | |
tree | 53c4101591181362a8581934f617108ee4a7124e /src | |
parent | Added test for "+" not followed by space in continue_req. (diff) | |
download | vmime-b6469f68a8c61da02d440cdd022c17cd8cdaeeaa.tar.gz vmime-b6469f68a8c61da02d440cdd022c17cd8cdaeeaa.zip |
Fixed SMTP disconnection error caused by handshake failure.
Diffstat (limited to 'src')
-rw-r--r-- | src/vmime/net/smtp/SMTPConnection.cpp | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/vmime/net/smtp/SMTPConnection.cpp b/src/vmime/net/smtp/SMTPConnection.cpp index e0b5bc68..574e5354 100644 --- a/src/vmime/net/smtp/SMTPConnection.cpp +++ b/src/vmime/net/smtp/SMTPConnection.cpp @@ -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(); |