mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-07-31 11:20:22 +02:00
Do not kill used ControlConnection
* Debug spam ++
This commit is contained in:
@@ -95,11 +95,13 @@ Source::setControlConnection( ControlConnection* cc )
|
|||||||
if ( !m_cc.isNull() && m_cc->isReady() && m_cc->isRunning() )
|
if ( !m_cc.isNull() && m_cc->isReady() && m_cc->isRunning() )
|
||||||
{
|
{
|
||||||
const QString& nodeid = Database::instance()->impl()->dbid();
|
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() )
|
if ( cc->id() < nodeid && m_cc->outbound() )
|
||||||
{
|
{
|
||||||
m_cc = cc;
|
|
||||||
// This ControlConnection is not needed anymore, get rid of it!
|
// This ControlConnection is not needed anymore, get rid of it!
|
||||||
m_cc->deleteLater();
|
m_cc->deleteLater();
|
||||||
|
// Use new ControlConnection
|
||||||
|
m_cc = cc;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Reference in New Issue
Block a user