Skip to content

Commit

Permalink
[2.1.1] 移除请求的 timeout
Browse files Browse the repository at this point in the history
这在不稳定的网络环境下可能带来致命问题
  • Loading branch information
idawnlight committed Jul 25, 2018
1 parent 715c792 commit c65fa9b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ public static function curl($url)
$curl = curl_init($url);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); // 信任任何证书
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_TIMEOUT, self::$_timeout);
//curl_setopt($curl, CURLOPT_TIMEOUT, self::$_timeout);

self::saveLog("Curl 方式发送\r\n");
curl_exec($curl);
Expand All @@ -292,7 +292,7 @@ public static function fgc($url)
$opts = array(
'http'=>array(
'method' => "GET",
'timeout' => self::$_timeout
//'timeout' => self::$_timeout
)
);
$cxContext = stream_context_create($opts);
Expand Down

0 comments on commit c65fa9b

Please sign in to comment.