作者 karlet

test

@@ -7,15 +7,15 @@ use Swoole\Database\RedisPool; @@ -7,15 +7,15 @@ use Swoole\Database\RedisPool;
7 class RedisCli 7 class RedisCli
8 { 8 {
9 private $pool; 9 private $pool;
10 - public function __construct($host,$port,$password,$dbIndex, $timeout=0, $num = 20) 10 + public function __construct($host,$port,$password,$dbIndex, $num = 20)
11 { 11 {
12 $this->pool = new RedisPool((new RedisConfig) 12 $this->pool = new RedisPool((new RedisConfig)
13 ->withHost($host) 13 ->withHost($host)
14 ->withPort($port) 14 ->withPort($port)
15 ->withAuth($password) 15 ->withAuth($password)
16 ->withDbIndex($dbIndex) 16 ->withDbIndex($dbIndex)
17 - ->withTimeout($timeout)  
18 - ->withReadTimeout($timeout) 17 +// ->withTimeout($timeout)
  18 +// ->withReadTimeout($timeout)
19 ,$num //默认64个连接池 19 ,$num //默认64个连接池
20 ); 20 );
21 } 21 }