aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2005-05-23 22:20:54 +0000
committerRoger Dingledine <arma@torproject.org>2005-05-23 22:20:54 +0000
commit5005f682aefb782bb50911809fa68ba9707a314d (patch)
treed1a34e16ef8b76d813e3e625a8728cb84666f859 /src
parentb984b1d09eb55c34600083f1af28ee28d54a8fd1 (diff)
downloadtor-5005f682aefb782bb50911809fa68ba9707a314d.tar
tor-5005f682aefb782bb50911809fa68ba9707a314d.tar.gz
Bugfix: we were checking to see if you want to send a keepalive, based
on five minutes since last successful write. But if you have bytes queued already, and they're not getting through, we were adding a new keepalive every second. This was bad. svn:r4296
Diffstat (limited to 'src')
-rw-r--r--src/or/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/or/main.c b/src/or/main.c
index d80ab6fb7..92e26e5cf 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -586,7 +586,7 @@ static void run_connection_housekeeping(int i, time_t now) {
(int)buf_datalen(conn->outbuf),
(int)(now-conn->timestamp_lastwritten));
connection_mark_for_close(conn);
- } else {
+ } else if (!buf_datalen(conn->outbuf)) {
/* either in clique mode, or we've got a circuit. send a padding cell. */
log_fn(LOG_DEBUG,"Sending keepalive to (%s:%d)",
conn->address, conn->port);