mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
Initialize mainloop events earlier, since other stuff may run them.
Fixes a stem test failure; bugfix on c7ce6b9821. Bug
not in any released Tor.
This commit is contained in:
@@ -1269,6 +1269,7 @@ run_tor_main_loop(void)
|
||||
handle_signals();
|
||||
monotime_init();
|
||||
timers_initialize();
|
||||
initialize_mainloop_events();
|
||||
|
||||
/* load the private keys, if we're supposed to have them, and set up the
|
||||
* TLS context. */
|
||||
|
||||
@@ -2675,7 +2675,7 @@ dns_servers_relaunch_checks(void)
|
||||
}
|
||||
|
||||
/** Initialize some mainloop_event_t objects that we require. */
|
||||
STATIC void
|
||||
void
|
||||
initialize_mainloop_events(void)
|
||||
{
|
||||
if (!schedule_active_linked_connections_event) {
|
||||
|
||||
@@ -87,6 +87,7 @@ void do_signewnym(time_t);
|
||||
time_t get_last_signewnym_time(void);
|
||||
|
||||
void tor_init_connection_lists(void);
|
||||
void initialize_mainloop_events(void);
|
||||
void tor_mainloop_free_all(void);
|
||||
|
||||
struct token_bucket_rw_t;
|
||||
@@ -97,7 +98,6 @@ extern struct token_bucket_rw_t global_bucket;
|
||||
extern struct token_bucket_rw_t global_relayed_bucket;
|
||||
|
||||
#ifdef MAINLOOP_PRIVATE
|
||||
STATIC void initialize_mainloop_events(void);
|
||||
STATIC void close_closeable_connections(void);
|
||||
STATIC void initialize_periodic_events(void);
|
||||
STATIC void teardown_periodic_events(void);
|
||||
|
||||
Reference in New Issue
Block a user