Update Redis.php

This commit is contained in:
Roman Kelesidis 2023-09-07 21:06:39 +07:00
commit b80874abe4

View file

@ -37,10 +37,12 @@ class Redis extends Common
public function connect() public function connect()
{ {
$connect_type = ($this->cfg['pconnect']) ? 'pconnect' : 'connect';
$this->cur_query = 'connect ' . $this->cfg['host'] . ':' . $this->cfg['port']; $this->cur_query = 'connect ' . $this->cfg['host'] . ':' . $this->cfg['port'];
$this->debug('start'); $this->debug('start');
if (@$this->redis->connect($this->cfg['host'], $this->cfg['port'])) { if (@$this->redis->$connect_type($this->cfg['host'], $this->cfg['port'])) {
$this->connected = true; $this->connected = true;
} }