From b80874abe4446465608fad7cf6f51feaeddf935a Mon Sep 17 00:00:00 2001 From: Roman Kelesidis Date: Thu, 7 Sep 2023 21:06:39 +0700 Subject: [PATCH] Update Redis.php --- src/Legacy/Datastore/Redis.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Legacy/Datastore/Redis.php b/src/Legacy/Datastore/Redis.php index ed6224ed4..f127eb971 100644 --- a/src/Legacy/Datastore/Redis.php +++ b/src/Legacy/Datastore/Redis.php @@ -37,10 +37,12 @@ class Redis extends Common public function connect() { + $connect_type = ($this->cfg['pconnect']) ? 'pconnect' : 'connect'; + $this->cur_query = 'connect ' . $this->cfg['host'] . ':' . $this->cfg['port']; $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; }