From 4f558843151f0c49c077d3d9a1cd8a187904a024 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Tue, 4 Dec 2018 12:07:23 -0500 Subject: Add an option to start tor in dormant mode for the first time. --- src/core/mainloop/netstatus.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/core/mainloop') diff --git a/src/core/mainloop/netstatus.c b/src/core/mainloop/netstatus.c index 59fd8f8037..2426baae34 100644 --- a/src/core/mainloop/netstatus.c +++ b/src/core/mainloop/netstatus.c @@ -129,8 +129,14 @@ netstatus_load_from_state(const or_state_t *state, time_t now) { time_t last_activity; if (state->Dormant == -1) { // Initial setup. - last_activity = now; - participating_on_network = true; + if (get_options()->DormantOnFirstStartup) { + last_activity = 0; + participating_on_network = false; + } else { + // Start up as active, treat activity as happening now. + last_activity = now; + participating_on_network = true; + } } else if (state->Dormant) { last_activity = 0; participating_on_network = false; -- cgit v1.2.3-54-g00ecf