diff options
author | Nick Mathewson <nickm@torproject.org> | 2016-11-28 07:41:45 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2016-12-16 11:06:18 -0500 |
commit | 404e9e5611eff39866c2e45133a60b40d7492f7e (patch) | |
tree | 9a554a28f85cf4ddf06a70cd12e47fe896e65b6c /src/or/main.c | |
parent | 08d3ca2e5657a759d10064a2acb62b0a47bc15ff (diff) | |
download | tor-404e9e5611eff39866c2e45133a60b40d7492f7e.tar.gz tor-404e9e5611eff39866c2e45133a60b40d7492f7e.zip |
Have multiple guard contexts we can switch between.
Currently, this code doesn't actually have the contexts behave
differently, (except for the legacy context), but it does switch
back and forth between them nicely.
Diffstat (limited to 'src/or/main.c')
-rw-r--r-- | src/or/main.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/or/main.c b/src/or/main.c index 96ff442c68..25f8b1270c 100644 --- a/src/or/main.c +++ b/src/or/main.c @@ -980,8 +980,11 @@ directory_info_has_arrived(time_t now, int from_cache, int suppress_logs) /* if we have enough dir info, then update our guard status with * whatever we just learned. */ int invalidate_circs = guards_update_all(); - // This shouldn't be able to occur at this point. - tor_assert_nonfatal(! invalidate_circs); + + if (invalidate_circs) { + circuit_mark_all_unused_circs(); + circuit_mark_all_dirty_circs_as_unusable(); + } /* Don't even bother trying to get extrainfo until the rest of our * directory info is up-to-date */ |