aboutsummaryrefslogtreecommitdiff
path: root/src/or/networkstatus.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-11-09 09:20:55 -0500
committerNick Mathewson <nickm@torproject.org>2017-11-09 09:20:55 -0500
commit552218437ccbe8fc13ad431fbe2167331b886497 (patch)
tree8a7f7f55cc0752d4499b4b7392ee8a0827b3a696 /src/or/networkstatus.c
parent06260315645945ca9e08b5a19b67c8adad65a698 (diff)
parent0c6eabf08898e0c9f2faa397f2c2bb5fb80b78b9 (diff)
downloadtor-552218437ccbe8fc13ad431fbe2167331b886497.tar.gz
tor-552218437ccbe8fc13ad431fbe2167331b886497.zip
Merge branch 'ticket12062_squashed'
Diffstat (limited to 'src/or/networkstatus.c')
-rw-r--r--src/or/networkstatus.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/or/networkstatus.c b/src/or/networkstatus.c
index e4a6a76749..a7aa01f787 100644
--- a/src/or/networkstatus.c
+++ b/src/or/networkstatus.c
@@ -52,6 +52,7 @@
#include "dirserv.h"
#include "dirvote.h"
#include "entrynodes.h"
+#include "hibernate.h"
#include "main.h"
#include "microdesc.h"
#include "networkstatus.h"
@@ -1208,6 +1209,14 @@ should_delay_dir_fetches(const or_options_t *options, const char **msg_out)
return 1;
}
+ if (we_are_hibernating()) {
+ if (msg_out) {
+ *msg_out = "We are hibernating or shutting down.";
+ }
+ log_info(LD_DIR, "Delaying dir fetches (Hibernating or shutting down)");
+ return 1;
+ }
+
if (options->UseBridges) {
if (!any_bridge_descriptors_known()) {
if (msg_out) {