Merge pull request #15311 from skazemi/fix/missing-global-up-callback

Fix missing global up callback in CellularContext
pull/15322/head
Martin Kojtal 2022-08-03 13:13:22 +01:00 committed by GitHub
commit 9ca538338a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -156,6 +156,12 @@ void CellularContext::do_connect_with_retry()
rtos::ThisThread::sleep_for(_retry_timeout_array[_retry_count] * 1s);
do_connect();
if (_cb_data.error == NSAPI_ERROR_OK) {
#if !NSAPI_PPP_AVAILABLE
if (!_nonip_req && !_cp_in_use) { // don't validate if non-ip case
validate_ip_address();
}
call_network_cb(NSAPI_STATUS_GLOBAL_UP);
#endif
return;
}
_retry_count++;