[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] when you expire a wedged dir conn, conn_close_if_marked wil...
- To: or-cvs@freehaven.net
- Subject: [or-cvs] when you expire a wedged dir conn, conn_close_if_marked wil...
- From: arma@seul.org (Roger Dingledine)
- Date: Mon, 12 Jul 2004 20:38:10 -0400 (EDT)
- Delivered-to: archiver@seul.org
- Delivered-to: or-cvs-outgoing@seul.org
- Delivered-to: or-cvs@seul.org
- Delivery-date: Mon, 12 Jul 2004 20:38:16 -0400
- Reply-to: or-dev@freehaven.net
- Sender: owner-or-cvs@freehaven.net
Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/home2/arma/work/onion/cvs/src/or
Modified Files:
	main.c 
Log Message:
when you expire a wedged dir conn, conn_close_if_marked will take
care of trying to flush before it closes
Index: main.c
===================================================================
RCS file: /home/or/cvsroot/src/or/main.c,v
retrieving revision 1.288
retrieving revision 1.289
diff -u -d -r1.288 -r1.289
--- main.c	4 Jul 2004 22:48:11 -0000	1.288
+++ main.c	13 Jul 2004 00:38:08 -0000	1.289
@@ -362,20 +362,7 @@
      !conn->marked_for_close &&
      conn->timestamp_lastwritten + 5*60 < now) {
     log_fn(LOG_WARN,"Expiring wedged directory conn (fd %d, purpose %d)", conn->s, conn->purpose);
-    if (connection_wants_to_flush(conn)) {
-      if(flush_buf(conn->s, conn->outbuf, &conn->outbuf_flushlen) < 0) {
-        log_fn(LOG_WARN,"flushing expired directory conn failed.");
-        connection_close_immediate(conn);
-        connection_mark_for_close(conn);
-        /*  */
-      } else {
-        /* XXXX Does this next part make sense, really? */
-        connection_mark_for_close(conn);
-        conn->hold_open_until_flushed = 1; /* give it a last chance */
-      }
-    } else {
-      connection_mark_for_close(conn);
-    }
+    connection_mark_for_close(conn);
     return;
   }