修复集群推流BUG
This commit is contained in:
@@ -181,7 +181,8 @@ public class RedisRpcStreamPushController extends RpcController {
|
||||
*/
|
||||
@RedisRpcMapping("play")
|
||||
public RedisRpcResponse play(RedisRpcRequest request) {
|
||||
int id = Integer.parseInt(request.getParam().toString());
|
||||
JSONObject paramJson = JSONObject.parseObject(request.getParam().toString());
|
||||
int id = paramJson.getInteger("id");
|
||||
RedisRpcResponse response = request.getResponse();
|
||||
if (id <= 0) {
|
||||
response.setStatusCode(ErrorCode.ERROR400.getCode());
|
||||
|
||||
@@ -194,7 +194,9 @@ public class RedisRpcPlayServiceImpl implements IRedisRpcPlayService {
|
||||
|
||||
@Override
|
||||
public void playPush(String serverId, Integer id, ErrorCallback<StreamInfo> callback) {
|
||||
RedisRpcRequest request = buildRequest("streamPush/play", id + "");
|
||||
JSONObject jsonObject = new JSONObject();
|
||||
jsonObject.put("id", id);
|
||||
RedisRpcRequest request = buildRequest("streamPush/play", jsonObject);
|
||||
request.setToId(serverId);
|
||||
RedisRpcResponse response = redisRpcConfig.request(request, userSetting.getPlayTimeout(), TimeUnit.SECONDS);
|
||||
if (response == null) {
|
||||
|
||||
Reference in New Issue
Block a user