(trunk libT) #3727 "Fix NAT-PMP race between renewal and expiry" -- committed patch from bodgit

This commit is contained in:
Charles Kerr 2010-11-07 21:33:01 +00:00
parent fc66d430df
commit 5bc663be6c
1 changed files with 1 additions and 1 deletions

View File

@ -212,7 +212,7 @@ tr_natpmpPulse( struct tr_natpmp * nat, tr_port private_port, tr_bool is_enabled
{
nat->state = TR_NATPMP_IDLE;
nat->is_mapped = TRUE;
nat->renew_time = tr_time( ) + LIFETIME_SECS;
nat->renew_time = tr_time( ) + ( resp.pnu.newportmapping.lifetime / 2 );
nat->private_port = resp.pnu.newportmapping.privateport;
nat->public_port = resp.pnu.newportmapping.mappedpublicport;
tr_ninf( getKey( ), _( "Port %d forwarded successfully" ), nat->private_port );