]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Add an extra flush attempt when closing wedged dir conns, in an attempt to isolate...
authorNick Mathewson <nickm@torproject.org>
Tue, 11 May 2004 01:55:32 +0000 (01:55 +0000)
committerNick Mathewson <nickm@torproject.org>
Tue, 11 May 2004 01:55:32 +0000 (01:55 +0000)
svn:r1848

src/or/main.c

index 3d12c8cf92b975725c3f82f10e2ed0072d623cf5..65be5363ef21c27bb6cddcf0c079c17930b26276 100644 (file)
@@ -352,6 +352,11 @@ static void run_connection_housekeeping(int i, time_t now) {
      !conn->marked_for_close &&
      conn->timestamp_lastwritten + 5*60 < now) {
     log_fn(LOG_WARN,"Expiring wedged directory conn (purpose %d)", conn->purpose);
+    /* XXXX This next check may help isolate where the pesky EPIPE bug
+     * really occurs. */
+    if (connection_wants_to_flush(conn)) {
+      flush_buf(conn->s, conn->outbuf, &conn->outbuf_flushlen);
+    }
     connection_mark_for_close(conn,0);
     /* XXXX Does this next part make sense, really? */
     conn->hold_open_until_flushed = 1; /* give it a last chance */