Bluetooth: mesh: Check Heartbeat Pub count prior scheduling delayed work
This check is needed to not schedule the delayed work if current message to be sent is the last heartbeat message. Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
This commit is contained in:
parent
37122d7205
commit
0572fe99ec
1 changed files with 1 additions and 1 deletions
|
@ -3062,7 +3062,7 @@ static void hb_publish(struct k_work *work)
|
|||
}
|
||||
|
||||
period_ms = hb_pwr2(cfg->hb_pub.period, 1) * 1000;
|
||||
if (period_ms) {
|
||||
if (period_ms && cfg->hb_pub.count > 1) {
|
||||
k_delayed_work_submit(&cfg->hb_pub.timer, period_ms);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue