mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 23:26:44 +00:00
move logs
This commit is contained in:
parent
e4e5d4a0c1
commit
be01489883
1 changed files with 2 additions and 4 deletions
|
|
@ -107,14 +107,14 @@ func (h *HeimdallClient) FetchWithRetry(rawPath string, rawQuery string) (*Respo
|
|||
if err == nil && res != nil {
|
||||
return res, nil
|
||||
}
|
||||
log.Info("Retrying again in 5 seconds to fetch data from Heimdall", "path", u.Path, "attempt", attempt)
|
||||
attempt++
|
||||
|
||||
// create a new ticker for retrying the request
|
||||
ticker := time.NewTicker(5 * time.Second)
|
||||
defer ticker.Stop()
|
||||
|
||||
for {
|
||||
log.Info("Retrying again in 5 seconds to fetch data from Heimdall", "path", u.Path, "attempt", attempt)
|
||||
attempt++
|
||||
select {
|
||||
case <-h.closeCh:
|
||||
log.Debug("Shutdown detected, terminating request")
|
||||
|
|
@ -124,8 +124,6 @@ func (h *HeimdallClient) FetchWithRetry(rawPath string, rawQuery string) (*Respo
|
|||
if err == nil && res != nil {
|
||||
return res, nil
|
||||
}
|
||||
log.Info("Retrying again in 5 seconds to fetch data from Heimdall", "path", u.Path, "attempt", attempt)
|
||||
attempt++
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue