summaryrefslogtreecommitdiff
path: root/src/or/hs_service.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-09-12 11:20:27 -0400
committerNick Mathewson <nickm@torproject.org>2017-09-12 11:20:27 -0400
commitd71a00e91f3921f6bdf160811313e7b32f890b6c (patch)
treeba1eb070b1c764cac2bc0f7507982c56391b2f96 /src/or/hs_service.c
parent6c5c74e11e63f8e1a924ac8de4784edaf56179fa (diff)
parent98953b1fc29a693aa797989402f7205523448408 (diff)
downloadtor-d71a00e91f3921f6bdf160811313e7b32f890b6c.tar.gz
tor-d71a00e91f3921f6bdf160811313e7b32f890b6c.zip
Merge remote-tracking branch 'dgoulet/ticket23480_032_01'
Diffstat (limited to 'src/or/hs_service.c')
-rw-r--r--src/or/hs_service.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/or/hs_service.c b/src/or/hs_service.c
index d32a120bc8..05045035f3 100644
--- a/src/or/hs_service.c
+++ b/src/or/hs_service.c
@@ -3023,8 +3023,14 @@ hs_service_lists_fnames_for_sandbox(smartlist_t *file_list,
void
hs_service_dir_info_changed(void)
{
- log_info(LD_REND, "New dirinfo arrived: consider reuploading descriptor");
- consider_republishing_hs_descriptors = 1;
+ if (hs_service_get_num_services() > 0) {
+ /* New directory information usually goes every consensus so rate limit
+ * every 30 minutes to not be too conservative. */
+ static struct ratelim_t dir_info_changed_ratelim = RATELIM_INIT(30 * 60);
+ log_fn_ratelim(&dir_info_changed_ratelim, LOG_INFO, LD_REND,
+ "New dirinfo arrived: consider reuploading descriptor");
+ consider_republishing_hs_descriptors = 1;
+ }
}
/* Called when we get an INTRODUCE2 cell on the circ. Respond to the cell and