We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dec3970 commit 2cfc587Copy full SHA for 2cfc587
src/SwooleConnection.php
@@ -119,7 +119,8 @@ protected function getConnectRedis(
119
$poolConfig = PoolManager::getPool($this->poolKey)->getPoolConfig();
120
$serialize = $poolConfig->getSerialize();
121
$redis = new \Swoole\Coroutine\Redis(['timeout' => $poolConfig->getTimeout()]);
122
- $retry = $this->retries;
+ $retry = $this->getPool()->getPoolConfig()->getMaxRetry();
123
+ $retry = $retry > 0 ? $retry : 1;
124
while ($retry-- > 0) {
125
$result = $redis->connect($host, $port, $serialize);
126
if ($result !== false) {
0 commit comments