aboutsummaryrefslogtreecommitdiff
path: root/src/or/connection_or.c
diff options
context:
space:
mode:
authorGeorge Kadianakis <desnacked@riseup.net>2016-03-23 13:35:37 +0200
committerNick Mathewson <nickm@torproject.org>2016-04-07 10:59:46 -0400
commitd5acb633aed08a9ee4436404971ffa7fe0cca030 (patch)
treed285cc61adcd0660d61d2f1b6d2e04b9be45260d /src/or/connection_or.c
parent7123e9706e424c2a0561ad81db3ef9e4073df30c (diff)
downloadtor-d5acb633aed08a9ee4436404971ffa7fe0cca030.tar.gz
tor-d5acb633aed08a9ee4436404971ffa7fe0cca030.zip
Don't mark guards as unreachable if connection_connect() fails.
Diffstat (limited to 'src/or/connection_or.c')
-rw-r--r--src/or/connection_or.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/or/connection_or.c b/src/or/connection_or.c
index ea49bdba77..369ed202e1 100644
--- a/src/or/connection_or.c
+++ b/src/or/connection_or.c
@@ -1281,11 +1281,9 @@ connection_or_connect, (const tor_addr_t *_addr, uint16_t port,
switch (connection_connect(TO_CONN(conn), conn->base_.address,
&addr, port, &socket_error)) {
case -1:
- /* If the connection failed immediately, and we're using
- * a proxy, our proxy is down. Don't blame the Tor server. */
- if (conn->base_.proxy_state == PROXY_INFANT)
- entry_guard_register_connect_status(conn->identity_digest,
- 0, 1, time(NULL));
+ /* We failed to establish a connection probably because of a local
+ * error. No need to blame the guard in this case. Notify the networking
+ * system of this failure. */
connection_or_connect_failed(conn,
errno_to_orconn_end_reason(socket_error),
tor_socket_strerror(socket_error));