From: Roger Dingledine Date: Tue, 27 Dec 2005 08:54:37 +0000 (+0000) Subject: when we succeed at connecting to a helper that we've never connected X-Git-Tag: tor-0.1.1.11-alpha~119 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f46c135fac3f6bf7300448c98bb9aed7034c7bcc;p=thirdparty%2Ftor.git when we succeed at connecting to a helper that we've never connected to before, mark all the previous helpers as up. This is handy if the network went away and then returned. svn:r5666 --- diff --git a/src/or/circuitbuild.c b/src/or/circuitbuild.c index af4e207ff5..7fd39c411d 100644 --- a/src/or/circuitbuild.c +++ b/src/or/circuitbuild.c @@ -1951,6 +1951,17 @@ helper_node_set_status(const char *digest, int succeeded) if (succeeded) { if (!helper->made_contact) { helper->made_contact = 1; + /* We've just added a new long-term helper node. + * Perhaps the network just came back? We should + * give our earlier helpers another try too. */ + SMARTLIST_FOREACH(helper_nodes, helper_node_t *, h, + { + routerinfo_t *r = router_get_by_digest(h->identity); + h->down_since = 0; + if (r) r->is_running = 1; + if (h == helper) + break; + }); changed = 1; } if (helper->down_since) {