diff --git a/multiproxy.go b/multiproxy.go index 4e27c7c..77e4d88 100644 --- a/multiproxy.go +++ b/multiproxy.go @@ -250,10 +250,7 @@ func (c *Client) do(req *http.Request) (*http.Response, error) { return resp, nil } - if lastErr != nil { - return nil, fmt.Errorf("all proxy servers failed, last error: %v", lastErr) - } - return nil, errors.New("all proxy servers are unavailable") + return nil, fmt.Errorf("all proxy servers failed, last error: %v", lastErr) } func (c *Client) Do(req *http.Request) (*http.Response, error) {