This commit is contained in:
2020-09-03 18:04:03 +08:00
parent ab0ea0c649
commit d4d1dd4b2b
2 changed files with 3 additions and 1 deletions
+2
View File
@@ -293,6 +293,7 @@ class Redis extends Component
/**
* 释放连接池
* @throws ConfigException
*/
public function release()
{
@@ -302,6 +303,7 @@ class Redis extends Component
/**
* 销毁连接池
* @throws ConfigException
*/
public function destroy()
{
+1 -1
View File
@@ -88,7 +88,7 @@ class Redis extends Pool
{
$redis = new SRedis();
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'])) {
throw new Exception(sprintf('Redis Error: %s, Host %s, Auth %s', $redis->getLastError(), $config['host'], $config['auth']));