This commit is contained in:
2023-11-23 16:21:57 +08:00
parent 5ed5ee5ca9
commit d30df26cc8
+2 -3
View File
@@ -153,9 +153,8 @@ SCRIPT;
$response = $client->{$name}(...$arguments); $response = $client->{$name}(...$arguments);
} catch (\Throwable $throwable) { } catch (\Throwable $throwable) {
$response = trigger_print_error($throwable, 'redis'); $response = trigger_print_error($throwable, 'redis');
} finally {
$this->pool()->push($this->host, $client);
} }
$this->pool()->push($this->host, $client);
return $response; return $response;
} }
@@ -178,7 +177,7 @@ SCRIPT;
{ {
$pool = Kiri::getPool(); $pool = Kiri::getPool();
if (!$pool->hasChannel($this->host)) { 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; return $pool;
} }