Fix repair bug; fix torrent refreshes

This commit is contained in:
Mukhtar Akere
2025-04-19 10:41:45 +01:00
parent 52877107c9
commit dc8ee3d150
9 changed files with 150 additions and 67 deletions

View File

@@ -121,6 +121,7 @@ func WithTransport(transport *http.Transport) ClientOption {
// WithRetryableStatus adds status codes that should trigger a retry
func WithRetryableStatus(statusCodes ...int) ClientOption {
return func(c *Client) {
c.retryableStatus = make(map[int]struct{}) // reset the map
for _, code := range statusCodes {
c.retryableStatus[code] = struct{}{}
}