mirror of
https://gitee.com/ledc/IYUUAutoReseed
synced 2025-05-23 10:05:23 +00:00
优化大于一万条做种,防止精简配置,导致超时设置无效。
This commit is contained in:
parent
741ccb4fb4
commit
4d452e3909
@ -286,9 +286,11 @@ class AutoReseed
|
|||||||
wlog($hashArray, 'hashString'.$k);
|
wlog($hashArray, 'hashString'.$k);
|
||||||
self::$wechatMsg['hashCount'] +=count($infohash_Dir);
|
self::$wechatMsg['hashCount'] +=count($infohash_Dir);
|
||||||
// 此处优化大于一万条做种时,设置超时
|
// 此处优化大于一万条做种时,设置超时
|
||||||
if(self::$wechatMsg['hashCount'] > 5000){
|
if(count($infohash_Dir) > 5000){
|
||||||
self::$curl->setOpt(CURLOPT_CONNECTTIMEOUT,$configALL['default']['CONNECTTIMEOUT']);
|
$connecttimeout = isset($configALL['default']['CONNECTTIMEOUT']) && $configALL['default']['CONNECTTIMEOUT']>60 ? $configALL['default']['CONNECTTIMEOUT'] : 60;
|
||||||
self::$curl->setOpt(CURLOPT_TIMEOUT,$configALL['default']['TIMEOUT']);
|
$timeout = isset($configALL['default']['TIMEOUT']) && $configALL['default']['TIMEOUT']>600 ? $configALL['default']['TIMEOUT'] : 600;
|
||||||
|
self::$curl->setOpt(CURLOPT_CONNECTTIMEOUT,$connecttimeout);
|
||||||
|
self::$curl->setOpt(CURLOPT_TIMEOUT,$timeout);
|
||||||
}
|
}
|
||||||
echo "正在向服务器提交 clients_".$k." 种子哈希……".PHP_EOL;
|
echo "正在向服务器提交 clients_".$k." 种子哈希……".PHP_EOL;
|
||||||
$res = self::$curl->post(self::$apiUrl . self::$endpoints['infohash'], $hashArray);
|
$res = self::$curl->post(self::$apiUrl . self::$endpoints['infohash'], $hashArray);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user