Skip to content

Commit

Permalink
Check for nil rate limiter
Browse files Browse the repository at this point in the history
  • Loading branch information
toshski committed Apr 3, 2024
1 parent 2533d6c commit 1f77165
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/scrape/scrape_rate_limiter.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ func WaitBeforeVisit(rateLimiter string, visitFunc func(string) error, pageURL s
func ScraperRateLimiterCheckErrors(domain string, err error) {
if err != nil {
limiter := GetRateLimiter(domain)
limiter.lastRequest = time.Time{}
if limiter != nil {
limiter.lastRequest = time.Time{}
}
}
}

Expand Down

0 comments on commit 1f77165

Please sign in to comment.