Skip to content

Commit 384f651

Browse files
committed
move TotalRetries default
1 parent 900581a commit 384f651

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

cmd/root.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,6 @@ func feedViaStdin(ctx context.Context, custom *custom.CustomBouncer, config *cfg
103103
return c.Wait()
104104
}
105105

106-
if config.TotalRetries == 0 {
107-
config.TotalRetries = 1
108-
}
109-
110106
attempt := 1
111107
delay := 0 * time.Second
112108

pkg/cfg/config.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,5 +78,9 @@ func NewConfig(reader io.Reader) (*BouncerConfig, error) {
7878
config.CacheRetentionDuration = 10 * time.Second
7979
}
8080

81+
if config.TotalRetries == 0 {
82+
config.TotalRetries = 1
83+
}
84+
8185
return config, nil
8286
}

0 commit comments

Comments
 (0)