summaryrefslogtreecommitdiff
path: root/src/or/main.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2008-02-21 05:51:09 +0000
committerRoger Dingledine <arma@torproject.org>2008-02-21 05:51:09 +0000
commit1812a22a60eca8614dccda990099a8e2efd388b6 (patch)
tree20b3acce4a871c8d959dc82620f03cbae0e5d8a7 /src/or/main.c
parent888922940742576f7fcdec45dbc00dd054b8a114 (diff)
downloadtor-1812a22a60eca8614dccda990099a8e2efd388b6.tar.gz
tor-1812a22a60eca8614dccda990099a8e2efd388b6.zip
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
Diffstat (limited to 'src/or/main.c')
-rw-r--r--src/or/main.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/or/main.c b/src/or/main.c
index 568de4d6c7..313c33f06a 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -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)) {