diff options
author | teor <teor@torproject.org> | 2019-10-21 13:28:04 +1000 |
---|---|---|
committer | teor <teor@torproject.org> | 2019-10-21 13:28:04 +1000 |
commit | 77c85360f66222365f2fbb98982b8bc0e4781acb (patch) | |
tree | 05463a11a6f11436ef1c21cda1ddfe6a517a5838 | |
parent | 3539fdfd7a0ad965f3e247116a6012d1b5d2a167 (diff) | |
parent | 04e9e74f1dd4fad7fe9e072253dd51b9c03bebf2 (diff) | |
download | tor-77c85360f66222365f2fbb98982b8bc0e4781acb.tar.gz tor-77c85360f66222365f2fbb98982b8bc0e4781acb.zip |
Merge branch 'maint-0.4.2'
-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 51a0165d19..efc6a63165 100644 --- a/src/core/mainloop/periodic.c +++ b/src/core/mainloop/periodic.c @@ -153,6 +153,11 @@ periodic_event_disconnect(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; } |