aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Richard <[email protected]>2005-07-21 16:59:18 +0000
committerVincent Richard <[email protected]>2005-07-21 16:59:18 +0000
commitde2431dd0c5934c5f6520e7dc212b51b4beec3f6 (patch)
tree61368b252fa7f2ca83e139998b760fceb35b5c19
parentAdded tests for smart pointer comparison. (diff)
downloadvmime-de2431dd0c5934c5f6520e7dc212b51b4beec3f6.tar.gz
vmime-de2431dd0c5934c5f6520e7dc212b51b4beec3f6.zip
Fixed a bug when destroying an unconnected IMAP service.
-rw-r--r--src/messaging/imap/IMAPConnection.cpp9
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;