Skip to content

Instantly share code, notes, and snippets.

Created April 26, 2013 19:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/5469818 to your computer and use it in GitHub Desktop.
Save anonymous/5469818 to your computer and use it in GitHub Desktop.
stdin
diff --git a/kimap/sessionthread.cpp b/kimap/sessionthread.cpp
index 25f5464..4bbd6f2 100644
--- a/kimap/sessionthread.cpp
+++ b/kimap/sessionthread.cpp
@@ -260,8 +260,19 @@ void SessionThread::socketError(KTcpSocket::Error error)
if ( !m_socket )
return;
Q_UNUSED( error ); // can be used for debugging
+
if ( doSslFallback ) {
+ static bool disconnectingFromHost = false;
+
+ if ( disconnectingFromHost ) {
+ kWarning() << "Ssl error while disconnecting from host " << error;
+ disconnectingFromHost = false;
+ emit socketError();
+ }
+
+ disconnectingFromHost = true;
m_socket->disconnectFromHost();
+ disconnectingFromHost = false;
} else {
emit socketError();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment