Browse Source

stop printing a log message at every iteration through the
event loop when holding open a conn for flushing but it
doesn't want to flush any more bytes yet.


svn:r6114

Roger Dingledine 19 years ago
parent
commit
e11f900a2a
1 changed files with 4 additions and 3 deletions
  1. 4 3
      src/or/main.c

+ 4 - 3
src/or/main.c

@@ -473,9 +473,10 @@ conn_close_if_marked(int i)
     if (retval >= 0 && /* Technically, we could survive things like
     if (retval >= 0 && /* Technically, we could survive things like
                           TLS_WANT_WRITE here. But don't bother for now. */
                           TLS_WANT_WRITE here. But don't bother for now. */
         conn->hold_open_until_flushed && connection_wants_to_flush(conn)) {
         conn->hold_open_until_flushed && connection_wants_to_flush(conn)) {
-      LOG_FN_CONN(conn, (LOG_INFO,LD_NET,
-                         "Holding conn (fd %d) open for more flushing.",
-                         conn->s));
+      if (retval > 0)
+        LOG_FN_CONN(conn, (LOG_INFO,LD_NET,
+                           "Holding conn (fd %d) open for more flushing.",
+                           conn->s));
       /* XXX should we reset timestamp_lastwritten here? */
       /* XXX should we reset timestamp_lastwritten here? */
       return 0;
       return 0;
     }
     }