From ca307d69226b4b8abff7a50bbb9b7f4f6e7fe04a Mon Sep 17 00:00:00 2001 From: "Uwe L. Korn" Date: Mon, 10 Jun 2013 10:43:05 +0200 Subject: [PATCH] Do not kill used ControlConnection * Debug spam ++ --- src/libtomahawk/Source.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/libtomahawk/Source.cpp b/src/libtomahawk/Source.cpp index 035288f01..8e7fd96c4 100644 --- a/src/libtomahawk/Source.cpp +++ b/src/libtomahawk/Source.cpp @@ -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