mirror of
https://github.com/transmission/transmission
synced 2025-02-22 14:10:34 +00:00
Don't attempt uTP connexions to peers learned from PEX that didn't signal support.
This commit is contained in:
parent
5af8e26251
commit
828c9888b0
1 changed files with 6 additions and 0 deletions
|
@ -3853,6 +3853,12 @@ initiateConnection( tr_peerMgr * mgr, Torrent * t, struct peer_atom * atom )
|
||||||
const time_t now = tr_time( );
|
const time_t now = tr_time( );
|
||||||
tr_bool utp = tr_sessionIsUTPEnabled(mgr->session) && !atom->utp_failed;
|
tr_bool utp = tr_sessionIsUTPEnabled(mgr->session) && !atom->utp_failed;
|
||||||
|
|
||||||
|
if( atom->fromFirst == TR_PEER_FROM_PEX )
|
||||||
|
/* PEX has explicit signalling for uTP support. If an atom
|
||||||
|
originally came from PEX and doesn't have the uTP flag, skip the
|
||||||
|
uTP connection attempt. Are we being optimistic here? */
|
||||||
|
utp = utp && (atom->flags & ADDED_F_UTP_FLAGS);
|
||||||
|
|
||||||
tordbg( t, "Starting an OUTGOING%s connection with %s",
|
tordbg( t, "Starting an OUTGOING%s connection with %s",
|
||||||
utp ? " µTP" : "",
|
utp ? " µTP" : "",
|
||||||
tr_atomAddrStr( atom ) );
|
tr_atomAddrStr( atom ) );
|
||||||
|
|
Loading…
Reference in a new issue