diff options
author | David Goulet <dgoulet@torproject.org> | 2021-03-17 11:53:14 -0400 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2021-03-17 11:53:14 -0400 |
commit | 15a95df376f8b8e27072db8d36f28b7054d13cef (patch) | |
tree | f5aac5cd56451b2562e5290aa76300e0855fdab3 /src/core | |
parent | 0ac03390e482a7ff1008f0051ac647114ce00c09 (diff) | |
parent | 066748c9cde058db4c12dec0675c036ac11d7e84 (diff) | |
download | tor-15a95df376f8b8e27072db8d36f28b7054d13cef.tar.gz tor-15a95df376f8b8e27072db8d36f28b7054d13cef.zip |
Merge branch 'tor-gitlab/mr/337'
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/mainloop/mainloop.c | 6 | ||||
-rw-r--r-- | src/core/mainloop/netstatus.c | 3 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/core/mainloop/mainloop.c b/src/core/mainloop/mainloop.c index ddd612bd74..69606c0d53 100644 --- a/src/core/mainloop/mainloop.c +++ b/src/core/mainloop/mainloop.c @@ -1820,6 +1820,12 @@ check_network_participation_callback(time_t now, const or_options_t *options) goto found_activity; } + /* If we aren't allowed to become dormant, then participation doesn't + matter */ + if (! options->DormantTimeoutEnabled) { + goto found_activity; + } + /* If we're running an onion service, we can't become dormant. */ /* XXXX this would be nice to change, so that we can be dormant with a * service. */ diff --git a/src/core/mainloop/netstatus.c b/src/core/mainloop/netstatus.c index e8755e07a8..b833149151 100644 --- a/src/core/mainloop/netstatus.c +++ b/src/core/mainloop/netstatus.c @@ -154,6 +154,9 @@ netstatus_load_from_state(const mainloop_state_t *state, time_t now) last_activity = now; participating_on_network = true; } + if (! get_options()->DormantTimeoutEnabled) { + participating_on_network = true; + } reset_user_activity(last_activity); } |