diff --git a/wchat/common/HttpClient.php b/wchat/common/HttpClient.php index 9ab1c4c..4c31087 100644 --- a/wchat/common/HttpClient.php +++ b/wchat/common/HttpClient.php @@ -337,7 +337,6 @@ class HttpClient */ private function coroutine($ip, $url, $data = []) { - echo $ip . ':' . $url . PHP_EOL; $client = $this->generate_client($ip, $url, $data); if ($client->statusCode < 0) { throw new \Exception($client->errMsg); @@ -391,7 +390,12 @@ class HttpClient private function generate_client($host, $url, $data) { $client = new SClient($host, $this->getHostPort(), $this->isSSL); - var_dump($host, $this->getHostPort()); + if (!empty($this->ssl_cert_file) && !empty($this->ssl_key_file)) { + $client->set([ + 'ssl_cert_file' => $this->ssl_cert_file, + 'ssl_key_file' => $this->ssl_key_file, + ]); + } if (!empty($this->agent)) { $this->header['User-Agent'] = $this->agent; }