[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor/master] Only set rate_limited in hs_pick_hsdir() if rate_limited_count or responsible_dirs_count is greater than 0
commit efde686aa537b31c7cc626b863e3e0b750975526
Author: Neel Chauhan <neel@xxxxxxxxx>
Date: Fri Apr 19 09:21:20 2019 -0400
Only set rate_limited in hs_pick_hsdir() if rate_limited_count or responsible_dirs_count is greater than 0
---
src/feature/hs/hs_common.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/feature/hs/hs_common.c b/src/feature/hs/hs_common.c
index a14ff6a64..f9caf24f1 100644
--- a/src/feature/hs/hs_common.c
+++ b/src/feature/hs/hs_common.c
@@ -1635,7 +1635,10 @@ hs_pick_hsdir(smartlist_t *responsible_dirs, const char *req_key_str,
}
} SMARTLIST_FOREACH_END(dir);
- rate_limited = rate_limited_count == responsible_dirs_count;
+ if (rate_limited_count > 0 || responsible_dirs_count > 0) {
+ rate_limited = rate_limited_count == responsible_dirs_count;
+ }
+
excluded_some =
smartlist_len(usable_responsible_dirs) < smartlist_len(responsible_dirs);
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits