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; }