mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-27 22:03:31 +01:00
when you expire a wedged dir conn, conn_close_if_marked will take
care of trying to flush before it closes svn:r2035
This commit is contained in:
parent
149115cc4e
commit
3294b514d3
@ -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);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user