summaryrefslogtreecommitdiff
path: root/src/or/scheduler.c
diff options
context:
space:
mode:
authorMatt Traudt <sirmatt@ksu.edu>2017-09-19 19:06:13 -0400
committerMatt Traudt <sirmatt@ksu.edu>2017-09-19 19:07:48 -0400
commita8c54ce58141d4ffd377ed5d2629fa5e42561f69 (patch)
tree0b0f3e806ffdc9bc3e70c79cac8c9ca5ce203961 /src/or/scheduler.c
parentac73913d408dca1c2f12b153162cdc609d732684 (diff)
downloadtor-a8c54ce58141d4ffd377ed5d2629fa5e42561f69.tar.gz
tor-a8c54ce58141d4ffd377ed5d2629fa5e42561f69.zip
sched: Allow the new sched to react to new cons
Diffstat (limited to 'src/or/scheduler.c')
-rw-r--r--src/or/scheduler.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/or/scheduler.c b/src/or/scheduler.c
index ca3cafd9af..64628e4c73 100644
--- a/src/or/scheduler.c
+++ b/src/or/scheduler.c
@@ -371,12 +371,13 @@ void
scheduler_notify_networkstatus_changed(const networkstatus_t *old_c,
const networkstatus_t *new_c)
{
+ /* Maybe the consensus param made us change the scheduler. */
+ set_scheduler();
+
/* Then tell the (possibly new) scheduler that we have a new consensus */
if (the_scheduler->on_new_consensus) {
the_scheduler->on_new_consensus(old_c, new_c);
}
- /* Maybe the consensus param made us change the scheduler. */
- set_scheduler();
}
/*