From d19dcbbd1a3b0310bcf1881d9f53ff895c25f3e0 Mon Sep 17 00:00:00 2001 From: Erik Boasson Date: Sat, 4 Jul 2020 13:04:17 +0200 Subject: [PATCH] Reduce growth rate of writer heartbeat interval Based on a sense that perhaps the interval grows too quickly in combination with network hiccups, combined with a suspicion that this may be the cause of some test failures. Signed-off-by: Erik Boasson --- src/core/ddsi/src/q_transmit.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/ddsi/src/q_transmit.c b/src/core/ddsi/src/q_transmit.c index 77184df..fa59eb5 100644 --- a/src/core/ddsi/src/q_transmit.c +++ b/src/core/ddsi/src/q_transmit.c @@ -86,10 +86,10 @@ int64_t writer_hbcontrol_intv (const struct writer *wr, const struct whc_state * int64_t ret = gv->config.const_hb_intv_sched; size_t n_unacked; - if (hbc->hbs_since_last_write > 2) + if (hbc->hbs_since_last_write > 5) { - unsigned cnt = hbc->hbs_since_last_write; - while (cnt-- > 2 && 2 * ret < gv->config.const_hb_intv_sched_max) + unsigned cnt = (hbc->hbs_since_last_write - 5) / 2; + while (cnt-- != 0 && 2 * ret < gv->config.const_hb_intv_sched_max) ret *= 2; }