add clear

This commit is contained in:
2020-05-21 16:42:42 +08:00
parent 403373db84
commit 83a86a2a57
+2 -1
View File
@@ -3,6 +3,7 @@
namespace wchat\common;
use Exception;
use Swoole\Coroutine;
use Swoole\Coroutine\Http\Client as SClient;
use Swoole\Coroutine\System;
use Swoole\Coroutine\Client;
@@ -340,7 +341,7 @@ class HttpClient
[$this->host, $this->port] = explode(':', $this->host);
}
if (!$this->checkIsIp($this->host)) {
if (!$this->checkIsIp($this->host) && Coroutine::getuid() > 0) {
$this->host = System::gethostbyname($this->host);
}