改名
This commit is contained in:
@@ -293,6 +293,7 @@ class Redis extends Component
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 释放连接池
|
* 释放连接池
|
||||||
|
* @throws ConfigException
|
||||||
*/
|
*/
|
||||||
public function release()
|
public function release()
|
||||||
{
|
{
|
||||||
@@ -302,6 +303,7 @@ class Redis extends Component
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 销毁连接池
|
* 销毁连接池
|
||||||
|
* @throws ConfigException
|
||||||
*/
|
*/
|
||||||
public function destroy()
|
public function destroy()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ class Redis extends Pool
|
|||||||
{
|
{
|
||||||
$redis = new SRedis();
|
$redis = new SRedis();
|
||||||
if (!$redis->connect($config['host'], $config['port'], $config['timeout'])) {
|
if (!$redis->connect($config['host'], $config['port'], $config['timeout'])) {
|
||||||
throw new Exception('The Redis Connect Fail.');
|
throw new Exception(sprintf('The Redis Connect %s::%d Fail.', $config['host'], $config['port']));
|
||||||
}
|
}
|
||||||
if (empty($config['auth']) || !$redis->auth($config['auth'])) {
|
if (empty($config['auth']) || !$redis->auth($config['auth'])) {
|
||||||
throw new Exception(sprintf('Redis Error: %s, Host %s, Auth %s', $redis->getLastError(), $config['host'], $config['auth']));
|
throw new Exception(sprintf('Redis Error: %s, Host %s, Auth %s', $redis->getLastError(), $config['host'], $config['auth']));
|
||||||
|
|||||||
Reference in New Issue
Block a user