mirror of
https://github.com/transmission/transmission
synced 2025-01-31 03:12:44 +00:00
(libT) #1402: T constantly maps and unmaps the NAT-PMP port
This commit is contained in:
parent
c2519b3e97
commit
d207fff71f
1 changed files with 8 additions and 5 deletions
|
@ -167,11 +167,14 @@ tr_natpmpPulse( struct tr_natpmp * nat,
|
|||
logVal( "readnatpmpresponseorretry", val );
|
||||
if( val >= 0 )
|
||||
{
|
||||
tr_ninf( getKey( ), _(
|
||||
"no longer forwarding port %d" ), nat->port );
|
||||
nat->state = TR_NATPMP_IDLE;
|
||||
nat->port = -1;
|
||||
nat->isMapped = 0;
|
||||
const int port = resp.pnu.newportmapping.privateport;
|
||||
tr_ninf( getKey( ), _( "no longer forwarding port %d" ), port );
|
||||
if( nat->port == port )
|
||||
{
|
||||
nat->port = -1;
|
||||
nat->state = TR_NATPMP_IDLE;
|
||||
nat->isMapped = 0;
|
||||
}
|
||||
}
|
||||
else if( val != NATPMP_TRYAGAIN )
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue