[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] Resolve FIXME: Possible solution to note_disconnect problem...
- To: or-cvs@freehaven.net
- Subject: [or-cvs] Resolve FIXME: Possible solution to note_disconnect problem...
- From: nickm@seul.org (Nick Mathewson)
- Date: Fri, 12 Nov 2004 00:52:22 -0500 (EST)
- Delivered-to: archiver@seul.org
- Delivered-to: or-cvs-outgoing@seul.org
- Delivered-to: or-cvs@seul.org
- Delivery-date: Fri, 12 Nov 2004 00:52:45 -0500
- Reply-to: or-dev@freehaven.net
- Sender: owner-or-cvs@freehaven.net
Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/tmp/cvs-serv31003/src/or
Modified Files:
connection.c
Log Message:
Resolve FIXME: Possible solution to note_disconnect problem; needs thought and review.
Index: connection.c
===================================================================
RCS file: /home/or/cvsroot/src/or/connection.c,v
retrieving revision 1.286
retrieving revision 1.287
diff -u -d -r1.286 -r1.287
--- connection.c 12 Nov 2004 05:03:50 -0000 1.286
+++ connection.c 12 Nov 2004 05:52:19 -0000 1.287
@@ -202,8 +202,18 @@
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);