summaryrefslogtreecommitdiff
path: root/trackerlogic.c
diff options
context:
space:
mode:
authorerdgeist <>2008-10-17 15:21:47 +0000
committererdgeist <>2008-10-17 15:21:47 +0000
commit4b31dce3b385fdbfff08434201e6661867a27c6f (patch)
tree7c7c62c8512b917846f7b4ced72b4900c2964f21 /trackerlogic.c
parentf4283be67732c2edce701762d871cf7b8495dd4a (diff)
release pools only after all other services have been stopped.
Diffstat (limited to 'trackerlogic.c')
-rw-r--r--trackerlogic.c16
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