summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2004-05-11 01:55:32 +0000
committerNick Mathewson <nickm@torproject.org>2004-05-11 01:55:32 +0000
commit3e2f889a29618a452d91063fe8db3d842acadf77 (patch)
treeb4b9608d30250447e224e00ad7ddcf1d05c37e0e
parentef13f70422c63cc778740c06a69b7fef978e0e45 (diff)
downloadtor-3e2f889a29618a452d91063fe8db3d842acadf77.tar.gz
tor-3e2f889a29618a452d91063fe8db3d842acadf77.zip
Add an extra flush attempt when closing wedged dir conns, in an attempt to isolate the EPIPE bug
svn:r1848
-rw-r--r--src/or/main.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/or/main.c b/src/or/main.c
index 3d12c8cf92..65be5363ef 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -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 */