mirror of
https://github.com/transmission/transmission
synced 2024-12-26 09:37:56 +00:00
fix minor shutdown bug
This commit is contained in:
parent
304f9f7f18
commit
43a016cdb9
1 changed files with 7 additions and 2 deletions
|
@ -108,11 +108,16 @@ static void
|
|||
pumpList( int i UNUSED, short s UNUSED, void * veh )
|
||||
{
|
||||
tr_event_handle * eh = veh;
|
||||
int doDie;
|
||||
|
||||
while( !eh->die )
|
||||
for( ;; )
|
||||
{
|
||||
struct tr_event_command * cmd;
|
||||
|
||||
doDie = eh->die && !eh->timerCount;
|
||||
if( doDie )
|
||||
break;
|
||||
|
||||
/* get the next command */
|
||||
tr_lockLock( eh->lock );
|
||||
cmd = tr_list_pop_front( &eh->commands );
|
||||
|
@ -161,7 +166,7 @@ pumpList( int i UNUSED, short s UNUSED, void * veh )
|
|||
tr_free( cmd );
|
||||
}
|
||||
|
||||
if( !eh->die )
|
||||
if( !doDie )
|
||||
timeout_add( &eh->pulse, &eh->pulseInterval );
|
||||
else {
|
||||
assert( eh->timerCount == 0 );
|
||||
|
|
Loading…
Reference in a new issue