From c15729b55532fd08f25bd588ce0030ea20773a47 Mon Sep 17 00:00:00 2001 From: luna Date: Mon, 5 Aug 2024 00:55:38 -0300 Subject: [PATCH] add idle timeout fallback for old configs (#4) * add fallback for old configs * use idle timeout from readme --- main.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/main.go b/main.go index 83ab7f0..d528640 100644 --- a/main.go +++ b/main.go @@ -200,6 +200,10 @@ func getIdleTimeout(serviceConfig ServiceConfig) time.Duration { if idleTimeout == 0 { idleTimeout = config.ShutDownAfterInactivitySeconds } + // for old configs + if idleTimeout == 0 { + idleTimeout = 2 * 60 + } idleTimeout = idleTimeout * time.Second return idleTimeout }