Skip to content

Commit ec4ccbb

Browse files
Update internal/config/config.go
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
1 parent 2064204 commit ec4ccbb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

internal/config/config.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,9 @@ func getEnv(key, defaultValue string) string {
8181
func getDuration(key string, defaultValue time.Duration) time.Duration {
8282
if value := os.Getenv(key); value != "" {
8383
if duration, err := time.ParseDuration(value); err == nil {
84-
return duration
84+
if duration > 0 {
85+
return duration
86+
}
8587
}
8688
}
8789
return defaultValue

0 commit comments

Comments
 (0)