From a43ef332ecb7be9dc3bcab92cf74e245b636b30a Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Tue, 13 Aug 2019 16:09:30 +0300 Subject: [PATCH] Bluetooth: Mesh: Fix canceling publication retransmission timer This branch is inherited from old code that used to start the timer as soon as a message was queued for transmission rather than when it was actually transmitted (the case today). It'll also cause a race in case the publication goes over the GATT layer since the "sent" callback happens synchronously in that case. Fixes #17821 Signed-off-by: Johan Hedberg --- subsys/bluetooth/mesh/access.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/subsys/bluetooth/mesh/access.c b/subsys/bluetooth/mesh/access.c index 1b6eb62b8bc..8478970a25b 100644 --- a/subsys/bluetooth/mesh/access.c +++ b/subsys/bluetooth/mesh/access.c @@ -231,11 +231,6 @@ static void mod_publish(struct k_work *work) if (err) { BT_ERR("Publishing failed (err %d)", err); } - - if (pub->count) { - /* Retransmissions also control the timer */ - k_delayed_work_cancel(&pub->timer); - } } struct bt_mesh_elem *bt_mesh_model_elem(struct bt_mesh_model *mod)