diff options
author | Roger Dingledine <arma@torproject.org> | 2004-03-27 01:28:14 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2004-03-27 01:28:14 +0000 |
commit | 9ab5f3c067eb9b35aada9ee377927ca6b340c03b (patch) | |
tree | 0f2d0a6d463c87817602e8fec221dfaba4ec15f5 | |
parent | 47b40de0aadcc3c6fa030b593d4a8dfd94ef8ed0 (diff) | |
download | tor-9ab5f3c067eb9b35aada9ee377927ca6b340c03b.tar tor-9ab5f3c067eb9b35aada9ee377927ca6b340c03b.tar.gz |
fix an assert trigger where an OP would fail to handshake, and we'd
expect it to have a nickname.
svn:r1351
-rw-r--r-- | src/or/connection.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/or/connection.c b/src/or/connection.c index f78033b91..c7f3867d0 100644 --- a/src/or/connection.c +++ b/src/or/connection.c @@ -187,7 +187,11 @@ _connection_mark_for_close(connection_t *conn, char reason) case CONN_TYPE_OR: /* Remember why we're closing this connection. */ if (conn->state != OR_CONN_STATE_OPEN) { - rep_hist_note_connect_failed(conn->nickname, time(NULL)); + /* XXX Nick: this still isn't right, because it might be + * dying even though we didn't initiate the connect. Can + * you look at this more? -RD */ + if(conn->nickname) + rep_hist_note_connect_failed(conn->nickname, time(NULL)); } else if (reason == CLOSE_REASON_UNUSED_OR_CONN) { rep_hist_note_disconnect(conn->nickname, time(NULL)); } else { |