Update wait time to terminate ua-manager 19/261219/2 accepted/tizen/unified/20210720.062507 submit/tizen/20210719.231231
authorAbhay Agarwal <ay.agarwal@samsung.com>
Tue, 13 Jul 2021 09:43:49 +0000 (15:13 +0530)
committerAbhay Agarwal <ay.agarwal@samsung.com>
Tue, 13 Jul 2021 09:47:38 +0000 (15:17 +0530)
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 <ay.agarwal@samsung.com>
ua-daemon/src/ua-manager-request-handler.c

index 1e2703206a18c75c91d7ac849a5b26c86f1b4a15..8d72b13ec09356670557bb4866dc331b4ad6db39 100755 (executable)
@@ -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[] =
 "<node name='/net/uamd'>"
 "      <interface name='net.uamd'>"
@@ -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(