summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDirk Engling <erdgeist@erdgeist.org>2026-11-05 16:27:38 +0100
committerDirk Engling <erdgeist@erdgeist.org>2026-11-05 16:27:38 +0100
commit90038ad8f32926b5e0ee30e3ed1f1cd1a9d22a93 (patch)
treefe774b5b8d3d6635f49e9a25cfbbdbcef6987ba9 /src
parentd4041285c893fce2be9133993ca6a6e6109842a0 (diff)
Start live sync where main knows the state file is in
Diffstat (limited to 'src')
-rw-r--r--src/opentracker.c3
-rw-r--r--src/trackerlogic.c2
2 files changed, 3 insertions, 2 deletions
diff --git a/src/opentracker.c b/src/opentracker.c
index f0841ff..65fe382 100644
--- a/src/opentracker.c
+++ b/src/opentracker.c
@@ -426,11 +426,14 @@ int main(int argc, char **argv) {
426 if (g_statefile) 426 if (g_statefile)
427 load_state(g_statefile); 427 load_state(g_statefile);
428 428
429 /* Nothing that adds a peer runs before the state file has been read */
430 livesync_init();
429 listen_start_tcp_workers(); 431 listen_start_tcp_workers();
430 listen_start_udp_workers(); 432 listen_start_udp_workers();
431 433
432 server_mainloop(0); 434 server_mainloop(0);
433 worker_stop_all(); 435 worker_stop_all();
436 livesync_deinit();
434 437
435 /* No thread is serving any more, so the teardown can run where a debugger 438 /* No thread is serving any more, so the teardown can run where a debugger
436 and the sanitizers can follow it */ 439 and the sanitizers can follow it */
diff --git a/src/trackerlogic.c b/src/trackerlogic.c
index dac0e0f..d25ddac 100644
--- a/src/trackerlogic.c
+++ b/src/trackerlogic.c
@@ -569,7 +569,6 @@ void trackerlogic_init(void) {
569 clean_init(); 569 clean_init();
570 fullscrape_init(); 570 fullscrape_init();
571 accesslist_init(); 571 accesslist_init();
572 livesync_init();
573 stats_init(); 572 stats_init();
574} 573}
575 574
@@ -610,7 +609,6 @@ void trackerlogic_deinit(void) {
610 609
611 clean_deinit(); 610 clean_deinit();
612 stats_deinit(); 611 stats_deinit();
613 livesync_deinit();
614 accesslist_deinit(); 612 accesslist_deinit();
615 fullscrape_deinit(); 613 fullscrape_deinit();
616 614