diff --git a/libtransmission/trevent.c b/libtransmission/trevent.c index 8f3637274..60909c87a 100644 --- a/libtransmission/trevent.c +++ b/libtransmission/trevent.c @@ -235,8 +235,8 @@ libeventThreadFunc( void * veh ) event_set_log_callback( logFunc ); /* loop until all the events are done */ - event_dispatch( ); - assert( eh->die ); + while( !eh->die ) + event_dispatch( ); /* shut down the thread */ tr_lockFree( eh->lock );