From 30bb2cf1c529e340b8c4599aa8bcaf64857e1c86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Tue, 31 Mar 2020 15:08:37 +0800 Subject: [PATCH] add clear --- wchat/common/HttpClient.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wchat/common/HttpClient.php b/wchat/common/HttpClient.php index be171aa..8a32398 100644 --- a/wchat/common/HttpClient.php +++ b/wchat/common/HttpClient.php @@ -338,12 +338,12 @@ class HttpClient private function coroutine($ip, $url, $data = []) { $client = $this->generate_client($ip, $url, $data); + $client->close(); if ($client->statusCode < 0) { throw new \Exception($client->errMsg); } $body = $client->body; - $client->close(); $header = $client->getHeaders();