diff options
author | Nick Mathewson <nickm@torproject.org> | 2014-03-27 15:58:43 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2014-03-27 15:58:43 -0400 |
commit | b0bbe6b2f1d8f0f2c83565f94d8a7dc5c5f72a91 (patch) | |
tree | 237ea0a4481d6ad83954959689ad3c52f6584e71 /src/or/control.c | |
parent | 0f395a7c064c314ca9dff4ac076b10461cc9b8c3 (diff) | |
download | tor-b0bbe6b2f1d8f0f2c83565f94d8a7dc5c5f72a91.tar.gz tor-b0bbe6b2f1d8f0f2c83565f94d8a7dc5c5f72a91.zip |
Report only the first bootstrap failure from an orconn
Otherwise, when we report "identity mismatch", we then later report
DONE when the connection gets closed.
Fixes bug 10431; bugfix on 0.2.1.1-alpha.
Diffstat (limited to 'src/or/control.c')
-rw-r--r-- | src/or/control.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/or/control.c b/src/or/control.c index 23e2054f9e..43c0539ddb 100644 --- a/src/or/control.c +++ b/src/or/control.c @@ -4884,7 +4884,7 @@ control_event_bootstrap(bootstrap_status_t status, int progress) */ MOCK_IMPL(void, control_event_bootstrap_problem, (const char *warn, int reason, - const or_connection_t *or_conn)) + or_connection_t *or_conn)) { int status = bootstrap_percent; const char *tag, *summary; @@ -4895,6 +4895,11 @@ MOCK_IMPL(void, /* bootstrap_percent must not be in "undefined" state here. */ tor_assert(status >= 0); + if (or_conn->have_noted_bootstrap_problem) + return; + + or_conn->have_noted_bootstrap_problem = 1; + if (bootstrap_percent == 100) return; /* already bootstrapped; nothing to be done here. */ |