From 63dc2fd550a92cfe6dc0f219e354d1e2f42cf7a8 Mon Sep 17 00:00:00 2001 From: Saeed Kazemi Date: Fri, 22 Jul 2022 17:01:39 +0200 Subject: [PATCH] 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. --- .../cellular/source/framework/device/CellularContext.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/connectivity/cellular/source/framework/device/CellularContext.cpp b/connectivity/cellular/source/framework/device/CellularContext.cpp index 6a2801888a..e8ee733d7f 100644 --- a/connectivity/cellular/source/framework/device/CellularContext.cpp +++ b/connectivity/cellular/source/framework/device/CellularContext.cpp @@ -156,6 +156,7 @@ 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) { + call_network_cb(NSAPI_STATUS_GLOBAL_UP); return; } _retry_count++;