read file fix
This commit is contained in:
@@ -22,7 +22,8 @@ type HTTPClient struct {
|
||||
|
||||
func (r *HTTPClient) Do(req *http.Request) (*http.Response, error) {
|
||||
if r.config != nil && strings.Contains(req.Host, "download.real-debrid.") {
|
||||
if host := r.config.GetRandomPreferredHost(); host != "" {
|
||||
prefHost := r.config.GetRandomPreferredHost()
|
||||
if host := prefHost; host != "" {
|
||||
req.Host = r.config.GetRandomPreferredHost()
|
||||
}
|
||||
}
|
||||
@@ -56,7 +57,7 @@ func NewHTTPClient(token string, maxRetries int, c config.ConfigInterface) *HTTP
|
||||
if resp.StatusCode == 429 {
|
||||
return true
|
||||
}
|
||||
// no need to retry
|
||||
// no need to retry)
|
||||
return false
|
||||
},
|
||||
log: logutil.NewLogger().Named("client"),
|
||||
|
||||
Reference in New Issue
Block a user