summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2013-10-04 20:07:12 (GMT)
committerChristian Mollekopf <chrigi_1@fastmail.fm>2013-10-04 20:07:12 (GMT)
commit16f053f5c40ea4579807199a1ee7d5ea78b839b8 (patch)
tree634c94c3d056e34e57a3c1fdec4365eb19e0f546
parenta16e9bed54172f78aaaf25c1638375ecc28e891c (diff)
downloadlibcalendaring-16f053f5c40ea4579807199a1ee7d5ea78b839b8.tar.gz
Call KTcpSocket::abort instead of disconnectFromHost to avoid infinite loop.
In some setups calling disconnectFromHost emits an error again, resulting in an infinite loop. I ran into this problem on Centos 6 with Qt 4.6. See also "Help solving an IMAP SSL bug" on kcd.
-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();
}