Skip to content

Commit a23d390

Browse files
Johan HedbergAnas Nashif
authored andcommitted
Bluetooth: Mesh: Fix resetting heartbeat subscription expiry properly
Set the value clearly to 0 instead of letting the old expiry time stay around. Signed-off-by: Johan Hedberg <[email protected]>
1 parent 2c86d82 commit a23d390

File tree

1 file changed

+2
-0
lines changed
  • subsys/bluetooth/host/mesh

1 file changed

+2
-0
lines changed

subsys/bluetooth/host/mesh/cfg.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2837,6 +2837,8 @@ static void heartbeat_sub_set(struct bt_mesh_model *model,
28372837

28382838
if (period_ms) {
28392839
cfg->hb_sub.expiry = k_uptime_get() + period_ms;
2840+
} else {
2841+
cfg->hb_sub.expiry = 0;
28402842
}
28412843

28422844
hb_sub_send_status(model, ctx, STATUS_SUCCESS);

0 commit comments

Comments
 (0)