Skip to content

Commit e9ac83a

Browse files
reset transport last and reset the default chars in gatt server
1 parent fbe0409 commit e9ac83a

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

connectivity/FEATURE_BLE/source/cordio/source/BLEInstanceBaseImpl.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,6 @@ ble_error_t BLEInstanceBase::shutdown()
171171
return BLE_ERROR_INITIALIZATION_INCOMPLETE;
172172
}
173173

174-
initialization_status = NOT_INITIALIZED;
175-
_hci_driver->terminate();
176-
177174
#if BLE_FEATURE_GATT_SERVER
178175
getGattServer().reset();
179176
#endif
@@ -185,6 +182,9 @@ ble_error_t BLEInstanceBase::shutdown()
185182
getGap().reset();
186183
_event_queue.clear();
187184

185+
initialization_status = NOT_INITIALIZED;
186+
_hci_driver->terminate();
187+
188188
return BLE_ERROR_NONE;
189189
}
190190

connectivity/FEATURE_BLE/source/cordio/source/GattServerImpl.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -883,6 +883,7 @@ ble_error_t GattServer::reset(ble::GattServer* server)
883883

884884
serviceCount = 0;
885885
characteristicCount = 0;
886+
default_services_added = false;
886887

887888
dataSentCallChain.clear();
888889
dataWrittenCallChain.clear();

0 commit comments

Comments
 (0)