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 <johan.hedberg@intel.com>
This commit is contained in:
Johan Hedberg 2017-09-28 17:54:13 +03:00 committed by Johan Hedberg
parent f1638e0a2b
commit 19c304086f

View file

@ -2837,6 +2837,8 @@ static void heartbeat_sub_set(struct bt_mesh_model *model,
if (period_ms) {
cfg->hb_sub.expiry = k_uptime_get() + period_ms;
} else {
cfg->hb_sub.expiry = 0;
}
hb_sub_send_status(model, ctx, STATUS_SUCCESS);