This commit is contained in:
2020-11-18 14:26:12 +08:00
parent 2cbeea1c4d
commit 0dcf0514c8
+2 -1
View File
@@ -8,6 +8,7 @@ use Closure;
use Exception; use Exception;
use Snowflake\Abstracts\Component; use Snowflake\Abstracts\Component;
use Snowflake\Core\Help; use Snowflake\Core\Help;
use Swoole\Coroutine;
use Swoole\Coroutine\System; use Swoole\Coroutine\System;
@@ -722,7 +723,7 @@ abstract class ClientAbstracts extends Component implements IClient
} }
if (isIp($domain)) { if (isIp($domain)) {
$this->host = $domain; $this->host = $domain;
} else { } else if ($this->use_swoole) {
$this->host = System::gethostbyname($domain) ?? $domain; $this->host = System::gethostbyname($domain) ?? $domain;
} }