Explorar o código

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

Roger Dingledine %!s(int64=20) %!d(string=hai) anos
pai
achega
5005f682ae
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/or/main.c

+ 1 - 1
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);