正在显示
2 个修改的文件
包含
2 行增加
和
2 行删除
| @@ -30,7 +30,7 @@ function start(){ | @@ -30,7 +30,7 @@ function start(){ | ||
| 30 | 30 | ||
| 31 | // 每秒检查一次是否空闲redis | 31 | // 每秒检查一次是否空闲redis |
| 32 | foreach (\Lib\RedisPool::$instance as $redis){ | 32 | foreach (\Lib\RedisPool::$instance as $redis){ |
| 33 | - if(time()-2 > $redis->lastTimer ){ | 33 | + if(time()-5 > $redis->lastTimer ){ |
| 34 | $redis->close(); | 34 | $redis->close(); |
| 35 | } | 35 | } |
| 36 | } | 36 | } |
| @@ -47,7 +47,7 @@ class RedisPool { | @@ -47,7 +47,7 @@ class RedisPool { | ||
| 47 | $this->lastTimer = time(); | 47 | $this->lastTimer = time(); |
| 48 | $this->client = new \Redis(); | 48 | $this->client = new \Redis(); |
| 49 | 49 | ||
| 50 | - $this->client->pconnect(REDIS_HOST,REDIS_PORT,1); | 50 | + $this->client->pconnect(REDIS_HOST,REDIS_PORT,2); |
| 51 | // 密码 | 51 | // 密码 |
| 52 | REDIS_PASSWORD && $this->client->auth(REDIS_PASSWORD); | 52 | REDIS_PASSWORD && $this->client->auth(REDIS_PASSWORD); |
| 53 | // 用库4 | 53 | // 用库4 |
-
请 注册 或 登录 后发表评论