mirror of https://github.com/ARMmbed/mbed-os.git
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 and validate_ip_address() on successful connect after failed try in blocking mode.pull/15311/head
parent
63dc2fd550
commit
19fddbf01a
|
@ -156,7 +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++;
|
||||
|
|
Loading…
Reference in New Issue