clear the pal gap queue on reset

pull/14672/head
Paul Szczepanek 2021-05-18 10:39:20 +01:00
parent 30cd6071cf
commit 910b7a6438
2 changed files with 5 additions and 0 deletions

View File

@ -1214,6 +1214,7 @@ ble_error_t Gap::reset()
/* Notify that the instance is about to shut down */
// shutdownCallChain.call(this);
shutdownCallChain.clear();
_event_queue.clear();
_event_handler = nullptr;
_initiating = false;

View File

@ -52,6 +52,10 @@ public:
* BLEInstanceBase::process
*/
virtual bool post(const mbed::Callback<void()>& event) = 0;
/** Remove all pending events.
*/
virtual void clear() = 0;
};
} // namespace ble