mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-21 22:03:49 -07:00
Update Redis.php
This commit is contained in:
parent
3c503c981f
commit
b80874abe4
1 changed files with 3 additions and 1 deletions
|
@ -37,10 +37,12 @@ class Redis extends Common
|
||||||
|
|
||||||
public function connect()
|
public function connect()
|
||||||
{
|
{
|
||||||
|
$connect_type = ($this->cfg['pconnect']) ? 'pconnect' : 'connect';
|
||||||
|
|
||||||
$this->cur_query = 'connect ' . $this->cfg['host'] . ':' . $this->cfg['port'];
|
$this->cur_query = 'connect ' . $this->cfg['host'] . ':' . $this->cfg['port'];
|
||||||
$this->debug('start');
|
$this->debug('start');
|
||||||
|
|
||||||
if (@$this->redis->connect($this->cfg['host'], $this->cfg['port'])) {
|
if (@$this->redis->$connect_type($this->cfg['host'], $this->cfg['port'])) {
|
||||||
$this->connected = true;
|
$this->connected = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue