From da22674736ebd5b5d88463b0a84896dbad70c20a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damian=20Kr=C3=B3lik?= <66667989+Damian-Nordic@users.noreply.github.com> Date: Tue, 1 Feb 2022 05:08:59 +0100 Subject: [PATCH] [zephyr] Drop BLE connection on endpoint close (#14600) When a BLE endpoint is closed on the peripheral side, the associated connection is not automatically closed. Instead, BlePlatformDelegate::NotifyChipConnectionClosed() is called, but the function is empty for Zephyr and many other platforms. Implement connection closing for Zephyr platform. Signed-off-by: Damian Krolik --- src/platform/Zephyr/BLEManagerImpl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/platform/Zephyr/BLEManagerImpl.cpp b/src/platform/Zephyr/BLEManagerImpl.cpp index c21134e33e5b83..4e2cd68763087b 100644 --- a/src/platform/Zephyr/BLEManagerImpl.cpp +++ b/src/platform/Zephyr/BLEManagerImpl.cpp @@ -767,7 +767,7 @@ bool BLEManagerImpl::SendReadResponse(BLE_CONNECTION_OBJECT conId, BLE_READ_REQU void BLEManagerImpl::NotifyChipConnectionClosed(BLE_CONNECTION_OBJECT conId) { - // Intentionally empty. + CloseConnection(conId); } bool BLEManagerImpl::IsSubscribed(bt_conn * conn)