From 41181107ebc6b1c309ce8112d325be76c5b45af1 Mon Sep 17 00:00:00 2001 From: Erik Montnemery Date: Wed, 7 Jul 2021 19:45:21 +0200 Subject: [PATCH] Don't wait for CASE connection if resolve fails in chip-device-ctrl (#8161) --- src/controller/python/chip/ChipDeviceCtrl.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/controller/python/chip/ChipDeviceCtrl.py b/src/controller/python/chip/ChipDeviceCtrl.py index 817091d049c370..48e35ef05a9819 100644 --- a/src/controller/python/chip/ChipDeviceCtrl.py +++ b/src/controller/python/chip/ChipDeviceCtrl.py @@ -110,10 +110,14 @@ def HandleKeyExchangeComplete(err): def HandleAddressUpdateComplete(nodeid, err): if err != 0: print("Failed to update node address: {}".format(err)) + # Failed update address, don't wait for HandleCommissioningComplete + self.state = DCState.IDLEHandleCommissioningComplete + self._ChipStack.callbackRes = err + self._ChipStack.completeEvent.set() else: print("Node address has been updated") - # Wait for HandleCommissioningComplete before setting - # self._ChipStack.callbackRes; we're not done until that happens. + # Wait for HandleCommissioningComplete before setting + # self._ChipStack.callbackRes; we're not done until that happens. def HandleCommissioningComplete(nodeid, err): if err != 0: