mirror of
https://github.com/transmission/transmission
synced 2025-03-04 10:38:13 +00:00
fix one cause of slow shutdown: even if we weren't using natpmp, we would wait on it...
This commit is contained in:
parent
5890eaef34
commit
9c93ac23b0
2 changed files with 3 additions and 5 deletions
|
@ -86,9 +86,6 @@ void
|
|||
tr_natpmpClose( tr_natpmp * nat )
|
||||
{
|
||||
assert( !nat->isMapped );
|
||||
assert( ( nat->state == TR_NATPMP_IDLE )
|
||||
|| ( nat->state == TR_NATPMP_ERR )
|
||||
|| ( nat->state == TR_NATPMP_DISCOVER ) );
|
||||
|
||||
closenatpmp( &nat->natpmp );
|
||||
tr_free( nat );
|
||||
|
|
|
@ -157,13 +157,14 @@ sharedPulse( void * vshared )
|
|||
{
|
||||
incomingPeersPulse( shared );
|
||||
}
|
||||
else if( ( shared->natStatus == TR_NAT_TRAVERSAL_ERROR ) || ( shared->natStatus == TR_NAT_TRAVERSAL_UNMAPPED ) )
|
||||
else
|
||||
{
|
||||
tr_ninf( getKey(), _( "Stopped" ) );
|
||||
shared->h->shared = NULL;
|
||||
tr_timerFree( &shared->pulseTimer );
|
||||
tr_netClose( shared->bindSocket );
|
||||
tr_natpmpClose( shared->natpmp );
|
||||
tr_upnpClose( shared->upnp );
|
||||
shared->h->shared = NULL;
|
||||
tr_free( shared );
|
||||
keepPulsing = 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue