Reworked the timeout waiting for the ble service to stop which was too short

This commit is contained in:
anschrammh 2023-03-26 22:52:47 +02:00
parent 286eb408ab
commit 3faa1162e2

View File

@ -58,13 +58,13 @@ bool ble_modem_off(void)
uint8_t timeout = 0;
while(ble_service_is_started())
{
tls_os_time_delay(pdMS_TO_TICKS(1));
tls_os_time_delay(pdMS_TO_TICKS(5));
// Service is stuck ?
if(++timeout > 10)
// Service is stuck ? waiting up to 300 ms for it to stop
if(++timeout > 60)
{
serviceStopSuccess = false;
break;
TLS_BT_APPL_TRACE_ERROR("%s, ble_service_stop timeout "NEW_LINE, __FUNCTION__);
return serviceStopSuccess;
}
};