|
|
@@ -234,9 +234,15 @@ class HttpServerSettelement
|
|
|
$data = json_encode(['ids' => $p_order_ids, 'bettype' => $bettype, 'settype' => $settype, 'game_code' => $game_code, 'match_id' => $match_id, 'change_status' => $nowchange_status], 256);
|
|
|
go(function () use ($data, $redisconfig) {
|
|
|
$redis = new Swoole\Coroutine\Redis();
|
|
|
- $redis->connect($redisconfig['host'], $redisconfig['port']);
|
|
|
+ $ret = $redis->connect($redisconfig['host'], $redisconfig['port']);
|
|
|
+ if (!$ret) {
|
|
|
+ throw new \Exception('redis 连接失败');
|
|
|
+ }
|
|
|
if (!empty($redisconfig['passwd'])) {
|
|
|
- $redis->auth($redisconfig['passwd']);
|
|
|
+ $ret = $redis->auth($redisconfig['passwd']);
|
|
|
+ if (!$ret) {
|
|
|
+ throw new \Exception('redis auth 失败');
|
|
|
+ }
|
|
|
}
|
|
|
$redis->select($redisconfig['db']);
|
|
|
|