diff options
author | teor <teor@torproject.org> | 2019-11-25 12:34:29 +1000 |
---|---|---|
committer | teor <teor@torproject.org> | 2019-11-25 12:34:29 +1000 |
commit | 400cee261ecccd024f6cb13dd1a940d4b9d0057b (patch) | |
tree | 8e1c380b66ea022ce3e08690c50c5a900c4db94c | |
parent | 54c01119ed59668bfa8ed6ef978201731bef0554 (diff) | |
parent | 4a8d4913227ea1d6b9302cda4703516595a3c1b5 (diff) | |
download | tor-400cee261ecccd024f6cb13dd1a940d4b9d0057b.tar.gz tor-400cee261ecccd024f6cb13dd1a940d4b9d0057b.zip |
Merge remote-tracking branch 'tor-github/pr/1422' into maint-0.3.5
-rw-r--r-- | changes/ticket32058 | 5 | ||||
-rw-r--r-- | src/core/mainloop/periodic.c | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/changes/ticket32058 b/changes/ticket32058 new file mode 100644 index 0000000000..b40bcda416 --- /dev/null +++ b/changes/ticket32058 @@ -0,0 +1,5 @@ + o Minor bugfixes (mainloop, periodic events): + - Periodic events enabled flag was not unset properly when shutting down tor + cleanly. This had the side effect to not re-enable periodic events when + tor_api.h is used to relaunch tor after a shutdown. Fixes bug 32058; + bugfix on 0.3.3.1-alpha. diff --git a/src/core/mainloop/periodic.c b/src/core/mainloop/periodic.c index 34690c54d9..2651bbbc89 100644 --- a/src/core/mainloop/periodic.c +++ b/src/core/mainloop/periodic.c @@ -137,6 +137,11 @@ periodic_event_destroy(periodic_event_item_t *event) { if (!event) return; + + /* First disable the event so we first cancel the event and set its enabled + * flag properly. */ + periodic_event_disable(event); + mainloop_event_free(event->ev); event->last_action_time = 0; } |