diff --git a/subsys/bluetooth/host/mesh/cfg_srv.c b/subsys/bluetooth/host/mesh/cfg_srv.c index 8e8d0928fcd..276696534e3 100644 --- a/subsys/bluetooth/host/mesh/cfg_srv.c +++ b/subsys/bluetooth/host/mesh/cfg_srv.c @@ -3057,20 +3057,20 @@ static void hb_publish(struct k_work *work) return; } - hb_send(model); - if (cfg->hb_pub.count == 0) { return; } - if (cfg->hb_pub.count != 0xffff) { - cfg->hb_pub.count--; - } - period_ms = hb_pwr2(cfg->hb_pub.period, 1) * 1000; if (period_ms) { k_delayed_work_submit(&cfg->hb_pub.timer, period_ms); } + + hb_send(model); + + if (cfg->hb_pub.count != 0xffff) { + cfg->hb_pub.count--; + } } static bool conf_is_valid(struct bt_mesh_cfg_srv *cfg)