diff options
author | Neel Chauhan <neel@neelc.org> | 2019-04-19 09:21:20 -0400 |
---|---|---|
committer | Neel Chauhan <neel@neelc.org> | 2019-04-19 09:21:20 -0400 |
commit | efde686aa537b31c7cc626b863e3e0b750975526 (patch) | |
tree | 82f3d0cd344a3dacac6762200ad3d614de6e9138 /src/feature/hs/hs_common.c | |
parent | 144bc5026e90421bb814f35f2b61f3ffa0d078f8 (diff) | |
download | tor-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.c | 5 |
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); |