Apply time-to-live range for app-defined loader 06/225906/1
authorJusung Son <jusung07.son@samsung.com>
Tue, 25 Feb 2020 08:15:32 +0000 (17:15 +0900)
committerJusung Son <jusung07.son@samsung.com>
Tue, 25 Feb 2020 08:15:32 +0000 (17:15 +0900)
 - min : 30sec, max 60sec

Change-Id: Id31bc158a6841ee3240552e9bc8ccddd91973bc1
Signed-off-by: Jusung Son <jusung07.son@samsung.com>
src/parser/loader_info.cc

index 1f6a2f5..f2ffdec 100644 (file)
@@ -30,6 +30,11 @@ int LoaderInfo::GetTimeToLive() {
 }
 
 void LoaderInfo::SetTimeToLive(int time) {
+  if (time < 30)
+    time = 30;
+  else if (time > 60)
+    time = 60;
+
   time_to_live_ = time;
 }