This commit is contained in:
2021-09-07 14:45:10 +08:00
parent 25f36fc3da
commit 8844131a0b
+2
View File
@@ -150,7 +150,9 @@ class Redis implements StopHeartbeatCheck
$this->read_timeout = 0; $this->read_timeout = 0;
} }
$redis->select($this->database); $redis->select($this->database);
if ($this->read_timeout > 0) {
$redis->setOption(\Redis::OPT_READ_TIMEOUT, $this->read_timeout); $redis->setOption(\Redis::OPT_READ_TIMEOUT, $this->read_timeout);
}
$redis->setOption(\Redis::OPT_PREFIX, $this->prefix); $redis->setOption(\Redis::OPT_PREFIX, $this->prefix);
return $redis; return $redis;