作者 karlet

feat:修改redis timeout

... ... @@ -7,14 +7,14 @@ use Swoole\Database\RedisPool;
class RedisCli
{
private $pool;
public function __construct($host,$port,$password,$dbIndex, $num = 20)
public function __construct($host,$port,$password,$dbIndex, $timeout=0, $num = 20)
{
$this->pool = new RedisPool((new RedisConfig)
->withHost($host)
->withPort($port)
->withAuth($password)
->withDbIndex($dbIndex)
->withTimeout(5)
->withTimeout($timeout)
,$num //默认64个连接池
);
}
... ...