Skip to content

Commit

Permalink
Add missing sleep
Browse files Browse the repository at this point in the history
  • Loading branch information
bogdantimes committed Nov 30, 2022
1 parent ff2f493 commit c481a36
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions depth/loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,7 @@ func (l *CCDepthLoader) getURL(pair string, date time.Time) string {
if err != nil {
// check if error is Timeout then repeat the request after 1 second
if strings.Contains(string(body), "Too many requests, please try again later.") {
time.Sleep(time.Second)
return l.getURL(pair, date)
}
panic(err)
Expand Down

0 comments on commit c481a36

Please sign in to comment.