diff options
Diffstat (limited to 'src/or/main.c')
-rw-r--r-- | src/or/main.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/or/main.c b/src/or/main.c index 094120fecf..1a2cfad255 100644 --- a/src/or/main.c +++ b/src/or/main.c @@ -52,6 +52,7 @@ #include "router.h" #include "routerlist.h" #include "routerparse.h" +#include "scheduler.h" #include "statefile.h" #include "status.h" #include "util_process.h" @@ -2455,6 +2456,14 @@ tor_init(int argc, char *argv[]) log_warn(LD_NET, "Problem initializing libevent RNG."); } + /* + * Initialize the scheduler - this has to come after + * options_init_from_torrc() sets up libevent - why yes, that seems + * completely sensible to hide the libevent setup in the option parsing + * code! + */ + scheduler_init(); + return 0; } @@ -2552,6 +2561,7 @@ tor_free_all(int postfork) channel_tls_free_all(); channel_free_all(); connection_free_all(); + scheduler_free_all(); buf_shrink_freelists(1); memarea_clear_freelist(); nodelist_free_all(); |