mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 07:12:47 +08:00
修复一处redisd master 返回的错误对象
This commit is contained in:
6
library/think/cache/driver/Redisd.php
vendored
6
library/think/cache/driver/Redisd.php
vendored
@@ -111,7 +111,8 @@ class Redisd
|
|||||||
public function master($master = false)
|
public function master($master = false)
|
||||||
{
|
{
|
||||||
if (isset(self::$redis_rw_handler[$master])) {
|
if (isset(self::$redis_rw_handler[$master])) {
|
||||||
return $this->handler = self::$redis_rw_handler[$master];
|
$this->handler = self::$redis_rw_handler[$master];
|
||||||
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
//如果不为主,则从配置的host剔除主,并随机读从,失败以后再随机选择从
|
//如果不为主,则从配置的host剔除主,并随机读从,失败以后再随机选择从
|
||||||
@@ -186,7 +187,8 @@ class Redisd
|
|||||||
throw new Exception($e->getMessage(), $e->getCode());
|
throw new Exception($e->getMessage(), $e->getCode());
|
||||||
}
|
}
|
||||||
|
|
||||||
return self::$redis_rw_handler[$master] = $this->handler;
|
self::$redis_rw_handler[$master] = $this->handler;
|
||||||
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user