Use bt_gatt_client_clone instead of bt_gatt_client_ref as that can
track requests per clone instead of using the core reference.
}
gas->db = gatt_db_ref(db);
- gas->client = bt_gatt_client_ref(client);
+ gas->client = bt_gatt_client_clone(client);
/* Handle the GAP services */
bt_uuid16_create(&gap_uuid, GAP_UUID16);
}
scan->db = gatt_db_ref(db);
- scan->client = bt_gatt_client_ref(client);
+ scan->client = bt_gatt_client_clone(client);
bt_string_to_uuid(&scan_parameters_uuid, SCAN_PARAMETERS_UUID);
gatt_db_foreach_service(db, &scan_parameters_uuid,