From 785f6b8bf9833de5d05022ad87dcbd23f7678621 Mon Sep 17 00:00:00 2001 From: RAFI <103924677+cmuhammedrafi@users.noreply.github.com> Date: Tue, 4 Jun 2024 20:25:16 +0530 Subject: [PATCH] DELIA-65419: Delay in providing 'oninternetstatuschange' event from Network Thunder Plugin (#5374) DELIA-65419: Update no internet event logic in both Network and NetworkManager (cherry picked from commit 3237958d5fdeda4ea721605ba7f5691a6379cb8e) --- Network/NetworkConnectivity.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Network/NetworkConnectivity.cpp b/Network/NetworkConnectivity.cpp index 621c59b679..debd7ebbfe 100644 --- a/Network/NetworkConnectivity.cpp +++ b/Network/NetworkConnectivity.cpp @@ -578,7 +578,8 @@ namespace WPEFramework { if(g_internetState.load() != InternetConnectionState) { LOGINFO("notification count %d ...", notifyWaitCount); - if(InternetConnectionState == nsm_internetState::NO_INTERNET && notifyWaitCount > 0) + /* Retry logic only need when continuous monitor is running, otherwise post notification immediately */ + if(InternetConnectionState == nsm_internetState::NO_INTERNET && isContinuesMonitoringNeeded && notifyWaitCount > 0) { /* Decrease the notification count to create a delay in posting the 'no internet' state. */ notifyWaitCount--;