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

* Prevent Tomahawk from ever trying to connect to itself.

This commit is contained in:
Christian Muehlhaeuser
2011-03-19 05:15:34 +01:00
parent 520806f0bb
commit 85826249c9

View File

@@ -481,6 +481,13 @@ Servent::connectToPeer( const QString& ha, int port, const QString &key, Connect
qDebug() << "Servent::connectToPeer:" << ha << ":" << port
<< thread() << QThread::currentThread();
if ( ( ha == m_externalAddress.toString() || ha == m_externalHostname ) &&
( port == m_externalPort ) )
{
qDebug() << "ERROR: Tomahawk won't try to connect to" << ha << ":" << port << ": identified as ourselves.";
return;
}
if( key.length() && conn->firstMessage().isNull() )
{
QVariantMap m;