diff options
author | Nick Mathewson <nickm@torproject.org> | 2004-07-02 23:40:03 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2004-07-02 23:40:03 +0000 |
commit | 7d8de8cd1041ed84f1073c55aa588de88bcd23c3 (patch) | |
tree | f043895ee9396a6b93dd382a23f6ae1137f61192 /src/or/connection.c | |
parent | d58d4c0db685da2d6575c4bc0a0136a231c29cf9 (diff) | |
download | tor-7d8de8cd1041ed84f1073c55aa588de88bcd23c3.tar tor-7d8de8cd1041ed84f1073c55aa588de88bcd23c3.tar.gz |
More digest/nickname fixes
svn:r2000
Diffstat (limited to 'src/or/connection.c')
-rw-r--r-- | src/or/connection.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/or/connection.c b/src/or/connection.c index 9b7b28495..00ef5ab95 100644 --- a/src/or/connection.c +++ b/src/or/connection.c @@ -712,7 +712,7 @@ int connection_handle_read(connection_t *conn) { conn->state == DIR_CONN_STATE_CONNECTING) { /* it's a directory server and connecting failed: forget about this router */ /* XXX I suspect pollerr may make Windows not get to this point. :( */ - router_mark_as_down(conn->nickname); + router_mark_as_down(conn->identity_digest); } /* There's a read error; kill the connection.*/ connection_close_immediate(conn); /* Don't flush; connection is dead. */ @@ -828,8 +828,9 @@ int connection_handle_write(connection_t *conn) { log_fn(LOG_DEBUG,"in-progress connect failed. Removing."); connection_close_immediate(conn); connection_mark_for_close(conn); - if (conn->nickname) - router_mark_as_down(conn->nickname); + /* Previously we tested conn->nickname; is this right? */ + if (conn->type == CONN_TYPE_OR) + router_mark_as_down(conn->identity_digest); return -1; } else { return 0; /* no change, see if next time is better */ |