From 6bb441281e754a181a09768a1b1f00ee9fee98ff Mon Sep 17 00:00:00 2001 From: "Uwe L. Korn" Date: Fri, 28 Jun 2013 15:44:11 +0200 Subject: [PATCH] Connections should be started in the thread they live --- src/libtomahawk/network/ConnectionManager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libtomahawk/network/ConnectionManager.cpp b/src/libtomahawk/network/ConnectionManager.cpp index fe97a04d8..5ab72f7be 100644 --- a/src/libtomahawk/network/ConnectionManager.cpp +++ b/src/libtomahawk/network/ConnectionManager.cpp @@ -380,7 +380,7 @@ ConnectionManager::handoverSocket( QTcpSocketExtra* sock ) d_func()->controlConnection->setOutbound( sock->_outbound ); d_func()->controlConnection->setPeerPort( sock->peerPort() ); - d_func()->controlConnection->start( sock ); + QMetaObject::invokeMethod( d_func()->controlConnection, "start", Qt::QueuedConnection, Q_ARG( QTcpSocket*, sock ) ); // ControlConntection is now connected, now it can be destroyed if the PeerInfos disappear d_func()->controlConnection->setShutdownOnEmptyPeerInfos( true ); d_func()->currentPeerInfo.clear();