Moved nextTimeout variable out of critical section in BLE::callDispatcher.

Initialization of Timeout object contains critical section inside constructor. Initialization inside critical section caused assertion failing under "debug" profile.
pull/9365/head
Leszek Rusinowicz 2019-01-14 11:13:28 +01:00
parent 51b8d6e59d
commit f294447c25
1 changed files with 1 additions and 1 deletions

View File

@ -423,10 +423,10 @@ void BLE::callDispatcher()
wsfOsDispatcher();
static Timeout nextTimeout;
CriticalSectionLock critical_section;
if (wsfOsReadyToSleep()) {
static Timeout nextTimeout;
// setup an mbed timer for the next Cordio timeout
bool_t pTimerRunning;
timestamp_t nextTimestamp = (timestamp_t) (WsfTimerNextExpiration(&pTimerRunning) * WSF_MS_PER_TICK) * 1000;