add clear
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
namespace wchat\common;
|
namespace wchat\common;
|
||||||
|
|
||||||
use Exception;
|
use Exception;
|
||||||
|
use Swoole\Coroutine;
|
||||||
use Swoole\Coroutine\Http\Client as SClient;
|
use Swoole\Coroutine\Http\Client as SClient;
|
||||||
use Swoole\Coroutine\System;
|
use Swoole\Coroutine\System;
|
||||||
use Swoole\Coroutine\Client;
|
use Swoole\Coroutine\Client;
|
||||||
@@ -340,7 +341,7 @@ class HttpClient
|
|||||||
[$this->host, $this->port] = explode(':', $this->host);
|
[$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);
|
$this->host = System::gethostbyname($this->host);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user