summaryrefslogtreecommitdiff
path: root/kimap/sessionthread.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kimap/sessionthread.cpp')
-rw-r--r--kimap/sessionthread.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/kimap/sessionthread.cpp b/kimap/sessionthread.cpp
index 479ee39..36e2c83 100644
--- a/kimap/sessionthread.cpp
+++ b/kimap/sessionthread.cpp
@@ -264,7 +264,8 @@ void SessionThread::socketError(KTcpSocket::Error error)
return;
Q_UNUSED( error ); // can be used for debugging
if ( doSslFallback ) {
- m_socket->disconnectFromHost();
+ //do not call m_socket->disconnectFromHost() here, as that can trigger an error again (resulting in an endless loop).
+ m_socket->abort();
} else {
emit socketError();
}