From a9fc2bf7be31c9c1bdb6ee2f5321bc092eac2ece Mon Sep 17 00:00:00 2001 From: chendejin Date: Thu, 5 Sep 2024 12:22:35 +0800 Subject: [PATCH] fix CI --- .../network-commissioning/network-commissioning.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/app/clusters/network-commissioning/network-commissioning.h b/src/app/clusters/network-commissioning/network-commissioning.h index 5e3d6d7698ff35..1f3c124fa8e14d 100644 --- a/src/app/clusters/network-commissioning/network-commissioning.h +++ b/src/app/clusters/network-commissioning/network-commissioning.h @@ -150,7 +150,15 @@ class Instance : public CommandHandlerInterface, Instance(EndpointId aEndpointId, DeviceLayer::NetworkCommissioning::WiFiDriver * apDelegate); Instance(EndpointId aEndpointId, DeviceLayer::NetworkCommissioning::ThreadDriver * apDelegate); Instance(EndpointId aEndpointId, DeviceLayer::NetworkCommissioning::EthernetDriver * apDelegate); - virtual ~Instance() = default; + virtual ~Instance() override + { +#if CHIP_DEVICE_CONFIG_SUPPORTS_CONCURRENT_CONNECTION + if (sInstances.Contains(this)) + { + sInstances.Remove(this); + } +#endif + }; }; // namespace NetworkCommissioning // NetworkDriver for the devices that don't have / don't need a real network driver.