summaryrefslogtreecommitdiff
path: root/src/or/connection.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/connection.c
parent06260315645945ca9e08b5a19b67c8adad65a698 (diff)
parent0c6eabf08898e0c9f2faa397f2c2bb5fb80b78b9 (diff)
downloadtor-552218437ccbe8fc13ad431fbe2167331b886497.tar.gz
tor-552218437ccbe8fc13ad431fbe2167331b886497.zip
Merge branch 'ticket12062_squashed'
Diffstat (limited to 'src/or/connection.c')
-rw-r--r--src/or/connection.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/or/connection.c b/src/or/connection.c
index e6aae71627..24f5a64622 100644
--- a/src/or/connection.c
+++ b/src/or/connection.c
@@ -1748,7 +1748,11 @@ connection_connect_sockaddr,(connection_t *conn,
if (get_options()->DisableNetwork) {
/* We should never even try to connect anyplace if DisableNetwork is set.
- * Warn if we do, and refuse to make the connection. */
+ * Warn if we do, and refuse to make the connection.
+ *
+ * We only check DisableNetwork here, not we_are_hibernating(), since
+ * we'll still try to fulfill client requests sometimes in the latter case
+ * (if it is soft hibernation) */
static ratelim_t disablenet_violated = RATELIM_INIT(30*60);
*socket_error = SOCK_ERRNO(ENETUNREACH);
log_fn_ratelim(&disablenet_violated, LOG_WARN, LD_BUG,