repair fixes!

This commit is contained in:
Ben Sarmiento
2023-11-19 01:04:48 +01:00
parent d77caa7575
commit 0b21b8d58c
6 changed files with 47 additions and 40 deletions

View File

@@ -20,9 +20,9 @@ func (rd *RealDebrid) UnrestrictUntilOk(link string) *UnrestrictResponse {
}
func retryUntilOk[T any](fn func() (T, error)) T {
const initialDelay = 2 * time.Second
const initialDelay = 1 * time.Second
const maxDelay = 128 * time.Second
const maxRetries = 5 // Maximum retries for non-429 errors
const maxRetries = 2 // Maximum retries for non-429 errors
var result T
var err error