summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2019-03-17 13:48:00 -0400
committerNick Mathewson <nickm@torproject.org>2019-04-04 11:48:36 -0400
commitd194f6bedf48410132b03fdab06b679512c14db1 (patch)
treefe698e0a444763f3c4bd0ac99bf6504d3b2d0d95 /src/core
parent1547fd99a68cb22410ed0842267fb0a1f1de925f (diff)
downloadtor-d194f6bedf48410132b03fdab06b679512c14db1.tar.gz
tor-d194f6bedf48410132b03fdab06b679512c14db1.zip
Implement an DormantCanceledByStartup option
Closes ticket 29357, and comes with appropriate notions of caution.
Diffstat (limited to 'src/core')
-rw-r--r--src/core/mainloop/netstatus.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/mainloop/netstatus.c b/src/core/mainloop/netstatus.c
index fc5a465ff7..4924888598 100644
--- a/src/core/mainloop/netstatus.c
+++ b/src/core/mainloop/netstatus.c
@@ -144,6 +144,10 @@ netstatus_load_from_state(const or_state_t *state, time_t now)
last_activity = now - 60 * state->MinutesSinceUserActivity;
participating_on_network = true;
}
+ if (get_options()->DormantCanceledByStartup) {
+ last_activity = now;
+ participating_on_network = true;
+ }
reset_user_activity(last_activity);
}