Diff between 0dd2c59b96ffe23183e9ee399cec6b8ef20d1dee and 6ca0afc43637441afb3c1a672ff02a4e95c79cd9

Changed Files

File Additions Deletions Status
src/shared/gatt-client.c +4 -0 modified

Full Patch

diff --git a/src/shared/gatt-client.c b/src/shared/gatt-client.c
index e21aca1..409a3ee 100644
--- a/src/shared/gatt-client.c
+++ b/src/shared/gatt-client.c
@@ -412,6 +412,10 @@ static void discovery_op_complete(struct discovery_op *op, bool success,
 		struct gatt_db_attribute *attr = svc->data;
 		uint16_t start, end;
 
+		/* Leave active services if operation was aborted */
+		if ((!success && err == 0) && gatt_db_service_get_active(attr))
+			continue;
+
 		gatt_db_attribute_get_service_data(attr, &start, &end,
 							NULL, NULL);