This commit is contained in:
2021-09-07 14:14:46 +08:00
parent 175b315526
commit 25f36fc3da
+1 -1
View File
@@ -140,7 +140,7 @@ class Redis implements StopHeartbeatCheck
private function newClient(): \Redis private function newClient(): \Redis
{ {
$redis = new \Redis(); $redis = new \Redis();
if (!$redis->pconnect($this->host, $this->port, $this->timeout)) { if (!$redis->connect($this->host, $this->port, $this->timeout)) {
throw new RedisConnectException(sprintf('The Redis Connect %s::%d Fail.', $this->host, $this->port)); throw new RedisConnectException(sprintf('The Redis Connect %s::%d Fail.', $this->host, $this->port));
} }
if (!empty($this->auth) && !$redis->auth($this->auth)) { if (!empty($this->auth) && !$redis->auth($this->auth)) {