From: Abhay Agarwal Date: Tue, 13 Jul 2021 09:43:49 +0000 (+0530) Subject: Update wait time to terminate ua-manager X-Git-Tag: submit/tizen/20210719.231231^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a38a27208f16f25bd8829c3926c1af13612ca03f;p=platform%2Fcore%2Fconnectivity%2Fua-manager.git Update wait time to terminate ua-manager This patch increases the wait time to terminate ua-manager daemon from 5 seconds to 5 minutes to avoid frequent termination of ua-manager. Change-Id: I9c6c2f609d867078d287f9c40a6e1b757a915a31 Signed-off-by: Abhay Agarwal --- diff --git a/ua-daemon/src/ua-manager-request-handler.c b/ua-daemon/src/ua-manager-request-handler.c index 1e27032..8d72b13 100755 --- a/ua-daemon/src/ua-manager-request-handler.c +++ b/ua-daemon/src/ua-manager-request-handler.c @@ -43,6 +43,10 @@ static guint owner_sig_id = 0; static cynara *p_cynara; static cynara_configuration *conf; +/* Wait time to terminate ua-manager (in milli-seconds) + wait time is 5 minutes (300000 ms)*/ +#define UAM_TERMINATE_WAIT_TIME 300000 + static const gchar uam_manager_introspection_xml[] = "" " " @@ -1642,7 +1646,9 @@ done: if (g_slist_length(uam_app_list) == 0) { if (source_id == 0) { UAM_INFO("No App referencing the ua-manager, Terminate the UAM"); - source_id = g_timeout_add_full(G_PRIORITY_HIGH, 5000, __schedule_uam_terminate, NULL, NULL); + source_id = g_timeout_add_full(G_PRIORITY_HIGH, + UAM_TERMINATE_WAIT_TIME, + __schedule_uam_terminate, NULL, NULL); } } @@ -1764,7 +1770,9 @@ static void __uam_manager_owner_change_cb(GDBusConnection *connection, _uam_core_cleanup_monitor((char *)name); } if (g_slist_length(uam_app_list) == 0 && is_app_removed) - source_id = g_timeout_add_full(G_PRIORITY_HIGH, 5000, __schedule_uam_terminate, NULL, NULL); + source_id = g_timeout_add_full(G_PRIORITY_HIGH, + UAM_TERMINATE_WAIT_TIME, + __schedule_uam_terminate, NULL, NULL); } static void __uam_manager_bus_acquired_cb(