From d30df26cc8cb987d9d7057a875e71289ec7a2241 Mon Sep 17 00:00:00 2001 From: whwyy Date: Thu, 23 Nov 2023 16:21:57 +0800 Subject: [PATCH] eee --- kiri-engine/Redis/Redis.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/kiri-engine/Redis/Redis.php b/kiri-engine/Redis/Redis.php index 1462dcc5..4020d188 100644 --- a/kiri-engine/Redis/Redis.php +++ b/kiri-engine/Redis/Redis.php @@ -153,9 +153,8 @@ SCRIPT; $response = $client->{$name}(...$arguments); } catch (\Throwable $throwable) { $response = trigger_print_error($throwable, 'redis'); - } finally { - $this->pool()->push($this->host, $client); } + $this->pool()->push($this->host, $client); return $response; } @@ -178,7 +177,7 @@ SCRIPT; { $pool = Kiri::getPool(); if (!$pool->hasChannel($this->host)) { - $pool->created($this->host, \config('cache.redis.pool.max', 10), [$this, 'connect']); + $pool->created($this->host, $this->pool['max'], [$this, 'connect']); } return $pool; }