File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -120,8 +120,12 @@ func storageStartup(s *state.State) error {
120120 // periodically try to initialize them again in the background.
121121 if len (initPools ) > 0 {
122122 go func () {
123+ delay := 5 * time .Second // first delay
124+ step := 5 * time .Second // increment per iteration
125+ maxDelay := time .Minute // cap at 60s
126+
123127 for {
124- t := time .NewTimer (time . Duration ( time . Minute ) )
128+ t := time .NewTimer (delay )
125129
126130 select {
127131 case <- s .ShutdownCtx .Done ():
@@ -164,6 +168,13 @@ func storageStartup(s *state.State) error {
164168 return // Our job here is done.
165169 }
166170 }
171+
172+ if delay < maxDelay {
173+ delay += step
174+ if delay > maxDelay {
175+ delay = maxDelay
176+ }
177+ }
167178 }
168179 }()
169180 } else {
You can’t perform that action at this time.
0 commit comments