mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
If we're trying to flush the last bytes on a connection (for
example, when answering a directory request), reset the time-to-give-up timeout every time we manage to write something on the socket. Bugfix on 0.1.2.x. svn:r13643
This commit is contained in:
+3
-2
@@ -573,11 +573,12 @@ conn_close_if_marked(int i)
|
||||
if (retval >= 0 && /* Technically, we could survive things like
|
||||
TLS_WANT_WRITE here. But don't bother for now. */
|
||||
conn->hold_open_until_flushed && connection_wants_to_flush(conn)) {
|
||||
if (retval > 0)
|
||||
if (retval > 0) {
|
||||
LOG_FN_CONN(conn, (LOG_INFO,LD_NET,
|
||||
"Holding conn (fd %d) open for more flushing.",
|
||||
conn->s));
|
||||
/* XXX020rc should we reset timestamp_lastwritten here? */
|
||||
conn->timestamp_lastwritten = now; /* reset so we can flush more */
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
if (connection_wants_to_flush(conn)) {
|
||||
|
||||
Reference in New Issue
Block a user