Fix missing GLOBAL_UP callback on successful connect

Fix an issue where CellularContext::do_connect_with_retry() does not call NSAPI_STATUS_GLOBAL_UP callback on successful connect after failed try in blocking mode.
pull/15311/head
Saeed Kazemi 2022-07-22 17:01:39 +02:00 committed by GitHub
parent 91b793c4fd
commit 63dc2fd550
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -156,6 +156,7 @@ void CellularContext::do_connect_with_retry()
rtos::ThisThread::sleep_for(_retry_timeout_array[_retry_count] * 1s); rtos::ThisThread::sleep_for(_retry_timeout_array[_retry_count] * 1s);
do_connect(); do_connect();
if (_cb_data.error == NSAPI_ERROR_OK) { if (_cb_data.error == NSAPI_ERROR_OK) {
call_network_cb(NSAPI_STATUS_GLOBAL_UP);
return; return;
} }
_retry_count++; _retry_count++;