diff options
author | Vincent Richard <[email protected]> | 2005-07-21 16:59:18 +0000 |
---|---|---|
committer | Vincent Richard <[email protected]> | 2005-07-21 16:59:18 +0000 |
commit | de2431dd0c5934c5f6520e7dc212b51b4beec3f6 (patch) | |
tree | 61368b252fa7f2ca83e139998b760fceb35b5c19 | |
parent | Added tests for smart pointer comparison. (diff) | |
download | vmime-de2431dd0c5934c5f6520e7dc212b51b4beec3f6.tar.gz vmime-de2431dd0c5934c5f6520e7dc212b51b4beec3f6.zip |
Fixed a bug when destroying an unconnected IMAP service.
-rw-r--r-- | src/messaging/imap/IMAPConnection.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/messaging/imap/IMAPConnection.cpp b/src/messaging/imap/IMAPConnection.cpp index 586a1716..5b82c113 100644 --- a/src/messaging/imap/IMAPConnection.cpp +++ b/src/messaging/imap/IMAPConnection.cpp @@ -155,10 +155,13 @@ void IMAPConnection::disconnect() void IMAPConnection::internalDisconnect() { - send(true, "LOGOUT", true); + if (isConnected()) + { + send(true, "LOGOUT", true); - m_socket->disconnect(); - m_socket = NULL; + m_socket->disconnect(); + m_socket = NULL; + } m_timeoutHandler = NULL; |