diff --git a/src/app/clusters/network-commissioning/network-commissioning.cpp b/src/app/clusters/network-commissioning/network-commissioning.cpp index f62105650bcc3b..7655c66f5461ad 100644 --- a/src/app/clusters/network-commissioning/network-commissioning.cpp +++ b/src/app/clusters/network-commissioning/network-commissioning.cpp @@ -1190,6 +1190,8 @@ void Instance::DisconnectOtherNetworks(Instance * currentNetwork) return (networkNo == maxNetworks) ? Loop::Break : Loop::Continue; }); + // If none of the configured networks is `connected`, we may have a + // lingering connection to a different network that we need to disconnect. if (!haveConnectedNetwork) { /* It's different to check the media driver connection state here.