mirror of
https://gitee.com/ledc/IYUUAutoReseed
synced 2026-10-23 13:24:11 +00:00
优化:延长超时时间,解决做种太多客户端响应超时的问题
This commit is contained in:
1 parent
20f5367737
commit
efd39c6da3
2 files changed
+4
-1
No files matched your search
@@ -571,7 +571,8 @@ class TransmissionRPC
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||
curl_setopt($ch, CURLOPT_POST, true);
|
||||
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
|
||||
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
|
||||
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 60);
|
||||
curl_setopt($ch, CURLOPT_TIMEOUT, 600);
|
||||
$content = curl_exec($ch);
|
||||
curl_close($ch);
|
||||
|
||||
|
||||
@@ -79,6 +79,8 @@ class qBittorrent
|
||||
$this->curl = new Curl();
|
||||
$this->curl->setOpt(CURLOPT_SSL_VERIFYPEER, false); // 禁止验证证书
|
||||
$this->curl->setOpt(CURLOPT_SSL_VERIFYHOST, false); // 不检查证书
|
||||
$this->curl->setOpt(CURLOPT_CONNECTTIMEOUT, 60); // 超时
|
||||
$this->curl->setOpt(CURLOPT_TIMEOUT, 600); // 超时
|
||||
// Authenticate and get cookie, else throw exception
|
||||
if (!$this->authenticate()) {
|
||||
throw new \Exception("Unable to authenticate with Web Api.");
|
||||
|
||||
Reference in new issue
Block a user