Fix a bug about updating slot info 08/169608/1
authorHwankyu Jhun <h.jhun@samsung.com>
Thu, 8 Feb 2018 02:16:34 +0000 (11:16 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Thu, 8 Feb 2018 02:16:34 +0000 (11:16 +0900)
Change-Id: I62b2777173f07cf2e9455864fe9119797a4ca358
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
src/launchpad.c

index 49f2f81..175e503 100755 (executable)
@@ -1398,6 +1398,11 @@ static void __update_slot(int type, bool app_exists)
                if (!cpc->touched && !cpc->on_boot)
                        return;
 
+               if (cpc->timer > 0) {
+                       g_source_remove(cpc->timer);
+                       cpc->timer = 0;
+               }
+
                if (cpc->pid == CANDIDATE_NONE &&
                                cpc->idle_checker == 0) {
                        _get_cpu_idle(&total, &idle);