summaryrefslogtreecommitdiff
path: root/src/or/main.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2005-03-19 23:58:42 +0000
committerRoger Dingledine <arma@torproject.org>2005-03-19 23:58:42 +0000
commit4a497e503077826228df667083548d06bf8afc2f (patch)
treeb9afc12290390ca539fd91c78dc54c1fed33c39a /src/or/main.c
parent856ab90ca8cf6ace5528396049d53e302d1a3ebe (diff)
downloadtor-4a497e503077826228df667083548d06bf8afc2f.tar.gz
tor-4a497e503077826228df667083548d06bf8afc2f.zip
if our clock jumps forward by 100 seconds or more, assume something
has gone wrong with our network and abandon all not-yet-used circs. svn:r3792
Diffstat (limited to 'src/or/main.c')
-rw-r--r--src/or/main.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/or/main.c b/src/or/main.c
index 4ebace81f1..a167e20412 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -892,8 +892,10 @@ static void second_elapsed_callback(int fd, short event, void *args)
stats_prev_global_write_bucket = global_write_bucket;
/* if more than 10s have elapsed, probably the clock jumped: doesn't count. */
- if (seconds_elapsed < 10)
+ if (seconds_elapsed < 100)
stats_n_seconds_working += seconds_elapsed;
+ else
+ circuit_note_clock_jumped(seconds_elapsed);
assert_all_pending_dns_resolves_ok();
run_scheduled_events(now.tv_sec);