Skip to content

Commit

Permalink
add idle timeout fallback for old configs (#4)
Browse files Browse the repository at this point in the history
* add fallback for old configs

* use idle timeout from readme
  • Loading branch information
lun-4 authored Aug 5, 2024
1 parent f19ad37 commit c15729b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit c15729b

Please sign in to comment.