diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-05-01 13:14:18 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-05-01 13:14:18 -0400 |
commit | b396e4e42906482d387f7c39b90b1d6ef17c70f2 (patch) | |
tree | 7b14cf354d08aa1f9dffe3964a5056a8e56a44c5 /changes/ticket25952 | |
parent | 895d20ab4b5e38f8730a4800136274443f713900 (diff) | |
download | tor-b396e4e42906482d387f7c39b90b1d6ef17c70f2.tar.gz tor-b396e4e42906482d387f7c39b90b1d6ef17c70f2.zip |
Move unreachable port warnings to a periodic event.
Arguably, the conditions under which these events happen should be a
bit different, but the rules are complex enough here that I've tried
to have this commit be pure refactoring.
Closes ticket 25952.
Finally, before this code goes away, take a moment to look at the
amazing way that we used to try to have an event happen
every N seconds:
get_uptime() / N != (get_uptime()+seconds_elapsed) / N
Truly, it is a thing of wonder. I'm glad we didn't start using this
pattern everywhere else.
Diffstat (limited to 'changes/ticket25952')
-rw-r--r-- | changes/ticket25952 | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/changes/ticket25952 b/changes/ticket25952 new file mode 100644 index 0000000000..e4dd56df06 --- /dev/null +++ b/changes/ticket25952 @@ -0,0 +1,9 @@ + o Minor features (mainloop): + - Move responsibility for + warning relay operators about unreachable ports + from a once-per-second callback to a callback that is only scheduled as + needed. Once enough items are removed from our once-per-second + callback, we can eliminate it entirely to conserve CPU when idle. + Closes ticket + 25952. + |