Skip to content

Commit

Permalink
修改redis connect链接方式(更改为pconnect)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaocong6 committed Jul 28, 2018
1 parent 1ca113e commit 214b09c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Lock/RedisLock.php
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,10 @@ private function randNum()
private function initRedis($config)
{
if (!empty($config)){
$config = array_merge($config, ['read_write_timeout'=>0]);
$config = array_merge($config, [
'read_write_timeout'=> 0,
'persistent' => true
]);
}
$this->redis = new Client($config);
}
Expand Down

0 comments on commit 214b09c

Please sign in to comment.