From 4b31dce3b385fdbfff08434201e6661867a27c6f Mon Sep 17 00:00:00 2001 From: erdgeist <> Date: Fri, 17 Oct 2008 15:21:47 +0000 Subject: release pools only after all other services have been stopped. --- trackerlogic.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/trackerlogic.c b/trackerlogic.c index f2691a5..8e33695 100644 --- a/trackerlogic.c +++ b/trackerlogic.c @@ -360,6 +360,14 @@ void trackerlogic_deinit( void ) { int bucket; size_t j; + /* Deinitialise background worker threads */ + stats_deinit( ); + sync_deinit( ); + livesync_init( ); + accesslist_init( ); + fullscrape_deinit( ); + clean_deinit( ); + /* Free all torrents... */ for(bucket=0; bucket<OT_BUCKET_COUNT; ++bucket ) { ot_vector *torrents_list = mutex_bucket_lock( bucket ); @@ -373,13 +381,7 @@ void trackerlogic_deinit( void ) { mutex_bucket_unlock( bucket ); } - /* Deinitialise background worker threads */ - stats_deinit( ); - sync_deinit( ); - livesync_init( ); - accesslist_init( ); - fullscrape_deinit( ); - clean_deinit( ); + /* Release mutexes */ mutex_deinit( ); } -- cgit v1.2.3