summaryrefslogtreecommitdiff
path: root/src/or/main.c
diff options
context:
space:
mode:
authorMatthew Finkel <matthew.finkel@gmail.com>2014-04-01 17:30:20 -0400
committerNick Mathewson <nickm@torproject.org>2014-04-08 15:37:01 -0400
commit2d5a7b1842b3dad522166659ff3a88e418f36d13 (patch)
treebd2ec85f4291a644502f5282e7a6fc791bdb29c5 /src/or/main.c
parent6bef082d0a6047fd3625f548d60ad257aaed2fab (diff)
downloadtor-2d5a7b1842b3dad522166659ff3a88e418f36d13.tar.gz
tor-2d5a7b1842b3dad522166659ff3a88e418f36d13.zip
Check for new IP addr after circuit liveliness returns
When we successfully create a usable circuit after it previously timed out for a certain amount of time, we should make sure that our public IP address hasn't changed and update our descriptor.
Diffstat (limited to 'src/or/main.c')
-rw-r--r--src/or/main.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/or/main.c b/src/or/main.c
index feca35c440..86f3437502 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -1162,6 +1162,18 @@ get_signewnym_epoch(void)
return newnym_epoch;
}
+static time_t time_to_check_descriptor = 0;
+/**
+ * Update our schedule so that we'll check whether we need to update our
+ * descriptor immediately, rather than after up to CHECK_DESCRIPTOR_INTERVAL
+ * seconds.
+ */
+void
+reschedule_descriptor_update_check(void)
+{
+ time_to_check_descriptor = 0;
+}
+
/** Perform regular maintenance tasks. This function gets run once per
* second by second_elapsed_callback().
*/
@@ -1171,7 +1183,6 @@ run_scheduled_events(time_t now)
static time_t last_rotated_x509_certificate = 0;
static time_t time_to_check_v3_certificate = 0;
static time_t time_to_check_listeners = 0;
- static time_t time_to_check_descriptor = 0;
static time_t time_to_download_networkstatus = 0;
static time_t time_to_shrink_memory = 0;
static time_t time_to_try_getting_descriptors = 0;