diff options
-rw-r--r-- | trackerlogic.c | 16 |
1 files 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 ) { | |||
360 | int bucket; | 360 | int bucket; |
361 | size_t j; | 361 | size_t j; |
362 | 362 | ||
363 | /* Deinitialise background worker threads */ | ||
364 | stats_deinit( ); | ||
365 | sync_deinit( ); | ||
366 | livesync_init( ); | ||
367 | accesslist_init( ); | ||
368 | fullscrape_deinit( ); | ||
369 | clean_deinit( ); | ||
370 | |||
363 | /* Free all torrents... */ | 371 | /* Free all torrents... */ |
364 | for(bucket=0; bucket<OT_BUCKET_COUNT; ++bucket ) { | 372 | for(bucket=0; bucket<OT_BUCKET_COUNT; ++bucket ) { |
365 | ot_vector *torrents_list = mutex_bucket_lock( bucket ); | 373 | ot_vector *torrents_list = mutex_bucket_lock( bucket ); |
@@ -373,13 +381,7 @@ void trackerlogic_deinit( void ) { | |||
373 | mutex_bucket_unlock( bucket ); | 381 | mutex_bucket_unlock( bucket ); |
374 | } | 382 | } |
375 | 383 | ||
376 | /* Deinitialise background worker threads */ | 384 | /* Release mutexes */ |
377 | stats_deinit( ); | ||
378 | sync_deinit( ); | ||
379 | livesync_init( ); | ||
380 | accesslist_init( ); | ||
381 | fullscrape_deinit( ); | ||
382 | clean_deinit( ); | ||
383 | mutex_deinit( ); | 385 | mutex_deinit( ); |
384 | } | 386 | } |
385 | 387 | ||