1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-06 22:26:32 +02:00

Connections should be started in the thread they live

This commit is contained in:
Uwe L. Korn
2013-06-28 15:44:11 +02:00
committed by Michael Zanetti
parent 8e0dcc69ed
commit 33cca96f00

View File

@@ -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();