fix timeout when downloading

This commit is contained in:
Mukhtar Akere
2025-05-02 20:48:29 +01:00
parent ef820b5bf4
commit 21354529e7
3 changed files with 3 additions and 2 deletions

View File

@@ -293,6 +293,7 @@ func New(options ...ClientOption) *Client {
TLSClientConfig: &tls.Config{ TLSClientConfig: &tls.Config{
InsecureSkipVerify: client.skipTLSVerify, InsecureSkipVerify: client.skipTLSVerify,
}, },
DisableKeepAlives: false,
} }
// Configure proxy if needed // Configure proxy if needed

View File

@@ -93,7 +93,7 @@ func (q *QBit) downloadFiles(torrent *Torrent, parent string) {
} }
client := &grab.Client{ client := &grab.Client{
UserAgent: "Decypharr[QBitTorrent]", UserAgent: "Decypharr[QBitTorrent]",
HTTPClient: request.New(request.WithTimeout(60 * time.Second)), HTTPClient: request.New(request.WithTimeout(0)),
} }
for _, file := range debridTorrent.Files { for _, file := range debridTorrent.Files {
if file.DownloadLink == nil { if file.DownloadLink == nil {

View File

@@ -23,7 +23,7 @@ var sharedClient = &http.Client{
ExpectContinueTimeout: 1 * time.Second, ExpectContinueTimeout: 1 * time.Second,
DisableKeepAlives: false, DisableKeepAlives: false,
}, },
Timeout: 60 * time.Second, Timeout: 0,
} }
type File struct { type File struct {