1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-08-01 17:38:37 +00:00

fix: avoid panic in IsRateLimited() function

This commit is contained in:
Frédéric Guillot 2024-10-06 20:48:28 -07:00
parent ee8c6621e9
commit 5c4df786de

View file

@ -70,7 +70,7 @@ func (r *ResponseHandler) ParseRetryDelay() int {
}
func (r *ResponseHandler) IsRateLimited() bool {
return r.httpResponse.StatusCode == http.StatusTooManyRequests
return r.httpResponse != nil && r.httpResponse.StatusCode == http.StatusTooManyRequests
}
func (r *ResponseHandler) IsModified(lastEtagValue, lastModifiedValue string) bool {