aboutsummaryrefslogtreecommitdiff
path: root/src/or/circuitstats.c
diff options
context:
space:
mode:
authorAndrea Shepard <andrea@torproject.org>2015-05-06 12:37:13 +0000
committerAndrea Shepard <andrea@torproject.org>2015-05-17 13:42:57 +0000
commitdce9e915c77ccf42e74a5cccca309e8085738d75 (patch)
tree73256809d1c90d2431b357617ec1136a5eeb5272 /src/or/circuitstats.c
parent411049d0d44963b8d9ec6f96c8dc62a106d6cc30 (diff)
downloadtor-dce9e915c77ccf42e74a5cccca309e8085738d75.tar.gz
tor-dce9e915c77ccf42e74a5cccca309e8085738d75.zip
Implement EVENT_NETWORK_LIVENESS
Diffstat (limited to 'src/or/circuitstats.c')
-rw-r--r--src/or/circuitstats.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/or/circuitstats.c b/src/or/circuitstats.c
index 7b3ad56537..3ced5afad5 100644
--- a/src/or/circuitstats.c
+++ b/src/or/circuitstats.c
@@ -1232,6 +1232,9 @@ circuit_build_times_network_is_live(circuit_build_times_t *cbt)
}
cbt->liveness.network_last_live = now;
cbt->liveness.nonlive_timeouts = 0;
+
+ /* Tell control.c */
+ control_event_network_liveness_update(1);
}
/**
@@ -1316,6 +1319,9 @@ circuit_build_times_network_close(circuit_build_times_t *cbt,
"Tor has not observed any network activity for the past %d "
"seconds. Disabling circuit build timeout recording.",
(int)(now - cbt->liveness.network_last_live));
+
+ /* Tell control.c */
+ control_event_network_liveness_update(0);
} else {
log_info(LD_CIRC,
"Got non-live timeout. Current count is: %d",