mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
Do not try to shut down the event loop when it is not initialized.
Doing so caused us to crash in some unusual circumstances, such as using --verify-config to verify a configuration that failed during the options_act() stage. Fixes bug 32407; bugfix on 0.3.3.1-alpha.
This commit is contained in:
@@ -774,6 +774,10 @@ tor_shutdown_event_loop_and_exit(int exitcode)
|
||||
main_loop_should_exit = 1;
|
||||
main_loop_exit_value = exitcode;
|
||||
|
||||
if (! tor_libevent_is_initialized()) {
|
||||
return; /* No event loop to shut down. */
|
||||
}
|
||||
|
||||
/* Die with an assertion failure in ten seconds, if for some reason we don't
|
||||
* exit normally. */
|
||||
/* XXXX We should consider this code if it's never used. */
|
||||
|
||||
Reference in New Issue
Block a user