From efdae639b303c38fa51eff8b31422b12be1cc009 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Mon, 24 Aug 2020 11:13:49 +0800 Subject: [PATCH] add clear --- wchat/common/HttpClient.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wchat/common/HttpClient.php b/wchat/common/HttpClient.php index 05cf4d5..d3f760b 100644 --- a/wchat/common/HttpClient.php +++ b/wchat/common/HttpClient.php @@ -655,7 +655,7 @@ class HttpClient { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $this->createRequestUrl($url, $data)); -// curl_setopt($ch, CURLOPT_TIMEOUT, 5);// 超时设置 + curl_setopt($ch, CURLOPT_TIMEOUT, 60);// 超时设置 curl_setopt($ch, CURLOPT_HEADER, true); if ($headers = $this->parseHeaderMat()) { @@ -671,7 +671,7 @@ class HttpClient curl_setopt($ch, CURLOPT_SSLKEY, $key); } curl_setopt($ch, CURLOPT_NOBODY, FALSE); -// curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 1); // 超时设置 + curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 1); // 超时设置 curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);//返回内容 curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);// 跟踪重定向 curl_setopt($ch, CURLOPT_ENCODING, 'gzip,deflate');