From 2e9a36a1d62474e7f81d490144d68f7f7ca629ce Mon Sep 17 00:00:00 2001 From: Matthias Ringwald Date: Wed, 22 Apr 2020 16:29:45 +0200 Subject: [PATCH] mesh: ignore pb link close if link is already closed --- src/mesh/pb_adv.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mesh/pb_adv.c b/src/mesh/pb_adv.c index 6ca59b85b..bf76e482f 100644 --- a/src/mesh/pb_adv.c +++ b/src/mesh/pb_adv.c @@ -206,6 +206,7 @@ static void pb_adv_handle_bearer_control(uint32_t link_id, uint8_t transaction_n case MESH_GENERIC_PROVISIONING_LINK_CLOSE: // Close a session on a bearer // does it match link id if (link_id != pb_adv_link_id) break; + if (link_state == LINK_STATE_W4_OPEN) break; reason = pdu[1]; link_state = LINK_STATE_W4_OPEN; log_info("link close, reason %x", reason);