diff --git a/ble/Gap.h b/ble/Gap.h index f94880e..5b4067a 100644 --- a/ble/Gap.h +++ b/ble/Gap.h @@ -1047,6 +1047,7 @@ public: virtual ble_error_t reset(void) { /* Notify that the instance is about to shutdown */ shutdownCallChain.call(this); + shutdownCallChain.clear(); /* Clear Gap state */ state.advertising = 0; diff --git a/ble/GattClient.h b/ble/GattClient.h index d523e0c..c65207f 100644 --- a/ble/GattClient.h +++ b/ble/GattClient.h @@ -376,6 +376,7 @@ public: virtual ble_error_t reset(void) { /* Notify that the instance is about to shutdown */ shutdownCallChain.call(this); + shutdownCallChain.clear(); onDataReadCallbackChain.clear(); onDataWriteCallbackChain.clear(); diff --git a/ble/GattServer.h b/ble/GattServer.h index 3f89bc8..ea46a88 100644 --- a/ble/GattServer.h +++ b/ble/GattServer.h @@ -447,6 +447,7 @@ public: virtual ble_error_t reset(void) { /* Notify that the instance is about to shutdown */ shutdownCallChain.call(this); + shutdownCallChain.clear(); serviceCount = 0; characteristicCount = 0; diff --git a/ble/SecurityManager.h b/ble/SecurityManager.h index e9996c5..e508954 100644 --- a/ble/SecurityManager.h +++ b/ble/SecurityManager.h @@ -284,6 +284,7 @@ public: virtual ble_error_t reset(void) { /* Notify that the instance is about to shutdown */ shutdownCallChain.call(this); + shutdownCallChain.clear(); securitySetupInitiatedCallback = NULL; securitySetupCompletedCallback = NULL;