Skip to content

Commit 19fddbf

Browse files
authored
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.
1 parent 63dc2fd commit 19fddbf

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

connectivity/cellular/source/framework/device/CellularContext.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,12 @@ void CellularContext::do_connect_with_retry()
156156
rtos::ThisThread::sleep_for(_retry_timeout_array[_retry_count] * 1s);
157157
do_connect();
158158
if (_cb_data.error == NSAPI_ERROR_OK) {
159+
#if !NSAPI_PPP_AVAILABLE
160+
if (!_nonip_req && !_cp_in_use) { // don't validate if non-ip case
161+
validate_ip_address();
162+
}
159163
call_network_cb(NSAPI_STATUS_GLOBAL_UP);
164+
#endif
160165
return;
161166
}
162167
_retry_count++;

0 commit comments

Comments
 (0)