mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-05 13:47:26 +02:00
* Abort connection only when trying to connect to same host and port.
This commit is contained in:
@@ -898,13 +898,13 @@ Servent::initiateConnection( const SipInfo& sipInfo, Connection* conn )
|
|||||||
|
|
||||||
foreach ( QHostAddress ha, addresses )
|
foreach ( QHostAddress ha, addresses )
|
||||||
{
|
{
|
||||||
if ( sipInfo.host() == ha.toString() )
|
if ( sipInfo.host() == ha.toString() && sipInfo.port() == d_func()->port )
|
||||||
{
|
{
|
||||||
tLog( LOGVERBOSE ) << Q_FUNC_INFO << "Tomahawk won't try to connect to" << sipInfo.host() << ":" << sipInfo.port() << ": same IP as ourselves.";
|
tLog( LOGVERBOSE ) << Q_FUNC_INFO << "Tomahawk won't try to connect to" << sipInfo.host() << ":" << sipInfo.port() << ": same IP as ourselves.";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( sipInfo.host() == d_func()->externalHostname )
|
if ( sipInfo.host() == d_func()->externalHostname && sipInfo.port() == d_func()->port )
|
||||||
{
|
{
|
||||||
tLog( LOGVERBOSE ) << Q_FUNC_INFO << "Tomahawk won't try to connect to" << sipInfo.host() << ":" << sipInfo.port() << ": same IP as ourselves.";
|
tLog( LOGVERBOSE ) << Q_FUNC_INFO << "Tomahawk won't try to connect to" << sipInfo.host() << ":" << sipInfo.port() << ": same IP as ourselves.";
|
||||||
return;
|
return;
|
||||||
|
Reference in New Issue
Block a user