Skip to content

Commit

Permalink
fix: possible crash while scraping (#1690)
Browse files Browse the repository at this point in the history
  • Loading branch information
toshski authored Apr 5, 2024
1 parent 8e47a65 commit e376fa4
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 e376fa4

Please sign in to comment.