[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [kdepimlibs/KDE/4.10] kimap: Calling reconnect from the disconnected signal confuses qt sockets.
From:       David Faure <faure () kde ! org>
Date:       2013-01-31 21:47:11
Message-ID: 20130131214711.C1B70A6091 () git ! kde ! org
[Download RAW message or body]

Git commit c51ee21200de693bea9608fcffe18eeffdf3e082 by David Faure.
Committed on 31/01/2013 at 22:01.
Pushed by dfaure into branch 'KDE/4.10'.

Calling reconnect from the disconnected signal confuses qt sockets.

Qt does some more cleanup after emitting disconnected, so if we're already
trying to reconnect, it will clean that up on the way. Better let Qt
finish, and only then reconnect.

CCMAIL: stefan.bruens@rwth-aachen.de

M  +2    -1    kimap/sessionthread.cpp

http://commits.kde.org/kdepimlibs/c51ee21200de693bea9608fcffe18eeffdf3e082

diff --git a/kimap/sessionthread.cpp b/kimap/sessionthread.cpp
index f3d2986..45ecb23 100644
--- a/kimap/sessionthread.cpp
+++ b/kimap/sessionthread.cpp
@@ -161,8 +161,9 @@ void SessionThread::run()
   connect( m_socket, SIGNAL(readyRead()),
            this, SLOT(readMessage()), Qt::QueuedConnection );
 =

+  // Delay the call to socketDisconnected so that it finishes disconnectin=
g before we call reconnect()
   connect( m_socket, SIGNAL(disconnected()),
-           this, SLOT(socketDisconnected()) );
+           this, SLOT(socketDisconnected()), Qt::QueuedConnection );
   connect( m_socket, SIGNAL(connected()),
            m_session, SLOT(socketConnected()) );
   connect( m_socket, SIGNAL(error(KTcpSocket::Error)),
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic