This commit is contained in:
xl
2023-05-26 09:20:31 +08:00
parent 0f1a55462e
commit d7fd23800b
5 changed files with 14 additions and 16 deletions
+1 -1
View File
@@ -68,7 +68,7 @@ class Redis extends Component
$length = \config('cache.redis.pool.max', 10);
on(OnWorkerExit::class, [$this, 'destroy']);
Kiri::getPool()->initConnections($config['host'], $length, static function () use ($config) {
Kiri::getPool()->created($config['host'], $length, static function () use ($config) {
$redis = new \Redis();
if (!$redis->connect($config['host'], $config['port'], $config['timeout'])) {
throw new RedisConnectException(sprintf('The Redis Connect %s::%d Fail.', $config['host'], $config['port']));