diff options
author | Roger Dingledine <arma@torproject.org> | 2005-12-27 08:54:37 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2005-12-27 08:54:37 +0000 |
commit | f46c135fac3f6bf7300448c98bb9aed7034c7bcc (patch) | |
tree | ef82741bff04dfb69d28bf26869a4f31a039c41e /src/or/circuitbuild.c | |
parent | 25fcb5fa9cc33c8305bf2a778a706d8dc0f7c24b (diff) | |
download | tor-f46c135fac3f6bf7300448c98bb9aed7034c7bcc.tar.gz tor-f46c135fac3f6bf7300448c98bb9aed7034c7bcc.zip |
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
Diffstat (limited to 'src/or/circuitbuild.c')
-rw-r--r-- | src/or/circuitbuild.c | 11 |
1 files changed, 11 insertions, 0 deletions
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) { |