[tor-commits] [tor/release-0.3.1] add a rate-limit.

nickm at torproject.org nickm at torproject.org
Wed Jan 31 15:01:20 UTC 2018


commit 86e6cb640942de251e601b43a8afad45c4761268
Author: Nick Mathewson <nickm at torproject.org>
Date:   Wed Jan 31 10:01:10 2018 -0500

    add a rate-limit.
---
 src/or/consdiffmgr.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/or/consdiffmgr.c b/src/or/consdiffmgr.c
index e2bb31e52..18aa9c2c0 100644
--- a/src/or/consdiffmgr.c
+++ b/src/or/consdiffmgr.c
@@ -1311,8 +1311,10 @@ store_multiple(consensus_cache_entry_handle_t **handles_out,
                             body_out,
                             bodylen_out);
       if (ent == NULL) {
-        log_warn(LD_FS, "Unable to store object %s compressed with %s.",
-                 description, methodname);
+        static ratelim_t cant_store_ratelim = RATELIM_INIT(5*70);
+        log_fn_ratelim(&cant_store_ratelim, LOG_WARN, LD_FS,
+                       "Unable to store object %s compressed with %s.",
+                       description, methodname);
         continue;
       }
 





More information about the tor-commits mailing list