aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2004-07-13 00:38:08 +0000
committerRoger Dingledine <arma@torproject.org>2004-07-13 00:38:08 +0000
commit3294b514d3173ce985ffbc349ce1d681ce2ed6e6 (patch)
tree96e7930ea59d412c1bee45cff824dce9c3bfd354
parent149115cc4eb26b755865117028f97f1f6a1f3d69 (diff)
downloadtor-3294b514d3173ce985ffbc349ce1d681ce2ed6e6.tar
tor-3294b514d3173ce985ffbc349ce1d681ce2ed6e6.tar.gz
when you expire a wedged dir conn, conn_close_if_marked will take
care of trying to flush before it closes svn:r2035
-rw-r--r--src/or/main.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/src/or/main.c b/src/or/main.c
index 77189e62f..4a6a2703d 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -362,20 +362,7 @@ 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 (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;
}