1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-20 07:49:42 +01:00

Do not kill used ControlConnection

* Debug spam ++
This commit is contained in:
Uwe L. Korn 2013-06-10 10:43:05 +02:00
parent 4a25055eda
commit 9578555042

@ -95,11 +95,13 @@ Source::setControlConnection( ControlConnection* cc )
if ( !m_cc.isNull() && m_cc->isReady() && m_cc->isRunning() )
{
const QString& nodeid = Database::instance()->impl()->dbid();
peerInfoDebug( (*cc->peerInfos().begin()) ) << Q_FUNC_INFO << "Comparing" << cc->id() << "and" << nodeid << "to detect duplicate connection, outbound:" << cc->outbound();
if ( cc->id() < nodeid && m_cc->outbound() )
{
m_cc = cc;
// This ControlConnection is not needed anymore, get rid of it!
m_cc->deleteLater();
// Use new ControlConnection
m_cc = cc;
return true;
}
else