Add a function to schedule a periodic event once, then disable it

This commit is contained in:
Nick Mathewson
2018-11-05 16:24:10 -05:00
parent 2070765c7c
commit 6d84972eb8
3 changed files with 28 additions and 7 deletions
+5 -1
View File
@@ -1600,7 +1600,11 @@ rescan_periodic_events(const or_options_t *options)
periodic_event_enable(item);
} else {
log_debug(LD_GENERAL, "Disabling periodic event %s", item->name);
periodic_event_disable(item);
if (item->flags & PERIODIC_EVENT_FLAG_FLUSH_ON_DISABLE) {
periodic_event_flush_and_disable(item);
} else {
periodic_event_disable(item);
}
}
}
}