From c7e0cd49481a5b275636c2a712ffd7faa32b1ac0 Mon Sep 17 00:00:00 2001 From: whwyy Date: Wed, 1 May 2024 02:02:58 +0800 Subject: [PATCH] eee --- kiri-engine/Redis/Redis.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/kiri-engine/Redis/Redis.php b/kiri-engine/Redis/Redis.php index 2322b392..999719e8 100644 --- a/kiri-engine/Redis/Redis.php +++ b/kiri-engine/Redis/Redis.php @@ -133,7 +133,7 @@ SCRIPT; */ public function destroy(): void { - $this->pool()->close($this->host); + $this->pool()->close('mysql.' . $this->host); } @@ -152,7 +152,7 @@ SCRIPT; return trigger_print_error(throwable($throwable)); } finally { if ($client->ping('h') == 'h') { - $this->pool()->push($this->host, $client); + $this->pool()->push('mysql.' . $this->host, $client); } } } @@ -164,7 +164,7 @@ SCRIPT; */ private function getClient(): \Redis { - return $this->pool()->get($this->host); + return $this->pool()->get('mysql.' . $this->host); } @@ -175,8 +175,8 @@ SCRIPT; protected function pool(): Pool { $pool = Kiri::getPool(); - if (!$pool->hasChannel($this->host)) { - $pool->created($this->host, $this->pool['max'], [$this, 'connect']); + if (!$pool->hasChannel('mysql.' . $this->host)) { + $pool->created('mysql.' . $this->host, $this->pool['max'], [$this, 'connect']); } return $pool; }