diff options
author | Nick Mathewson <nickm@torproject.org> | 2004-11-12 05:52:19 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2004-11-12 05:52:19 +0000 |
commit | 2a5bcb29e65510a5161726fa2317997fe2fc615b (patch) | |
tree | ad5306ef7979e178016986422ddbfc8c925cf6a8 /src/or/connection.c | |
parent | 5d92fbe30e30844a02c155f0874df6b086e4dc7d (diff) | |
download | tor-2a5bcb29e65510a5161726fa2317997fe2fc615b.tar tor-2a5bcb29e65510a5161726fa2317997fe2fc615b.tar.gz |
Resolve FIXME: Possible solution to note_disconnect problem; needs thought and review.
svn:r2807
Diffstat (limited to 'src/or/connection.c')
-rw-r--r-- | src/or/connection.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/or/connection.c b/src/or/connection.c index 329b3b4de..ea766fb9f 100644 --- a/src/or/connection.c +++ b/src/or/connection.c @@ -202,8 +202,18 @@ void connection_about_to_close_connection(connection_t *conn) rep_hist_note_connect_failed(conn->identity_digest, time(NULL)); control_event_or_conn_status(conn, OR_CONN_EVENT_FAILED); } - } else if (0) { // XXX reason == CLOSE_REASON_UNUSED_OR_CONN) { + } else if (conn->hold_open_until_flushed) { + /* XXXX009 We used to have an arg that told us whether we closed the + * connection on purpose or not. Can we use hold_open_until_flushed + * instead? We only set it when we are intentionally closing a + * connection. -NM + * + * (Of course, now things we set to close which expire rather than + * flushing still get noted as dead, not disconnected. But this is an + * improvement. -NM + */ rep_hist_note_disconnect(conn->identity_digest, time(NULL)); + control_event_or_conn_status(conn, OR_CONN_EVENT_CLOSED); } else if(conn->identity_digest) { rep_hist_note_connection_died(conn->identity_digest, time(NULL)); control_event_or_conn_status(conn, OR_CONN_EVENT_CLOSED); |