summaryrefslogtreecommitdiff
path: root/src/feature/hs/hs_common.c
diff options
context:
space:
mode:
authorNeel Chauhan <neel@neelc.org>2019-04-19 09:21:20 -0400
committerNeel Chauhan <neel@neelc.org>2019-04-19 09:21:20 -0400
commitefde686aa537b31c7cc626b863e3e0b750975526 (patch)
tree82f3d0cd344a3dacac6762200ad3d614de6e9138 /src/feature/hs/hs_common.c
parent144bc5026e90421bb814f35f2b61f3ffa0d078f8 (diff)
downloadtor-efde686aa537b31c7cc626b863e3e0b750975526.tar.gz
tor-efde686aa537b31c7cc626b863e3e0b750975526.zip
Only set rate_limited in hs_pick_hsdir() if rate_limited_count or responsible_dirs_count is greater than 0
Diffstat (limited to 'src/feature/hs/hs_common.c')
-rw-r--r--src/feature/hs/hs_common.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/feature/hs/hs_common.c b/src/feature/hs/hs_common.c
index a14ff6a645..f9caf24f1c 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);