修复关闭按需拉流无效的问题

pull/388/head
dengming 2022-03-10 15:08:41 +08:00
parent ec97c6a7d0
commit bef7fb2440
2 changed files with 2 additions and 2 deletions

View File

@ -459,7 +459,7 @@ public class ZLMHttpHookListener {
}
}
MediaServerItem mediaServerItem = mediaServerService.getOne(mediaServerId);
if (mediaServerItem != null && "-1".equals(mediaServerItem.getStreamNoneReaderDelayMS())) {
if (mediaServerItem != null && mediaServerItem.getStreamNoneReaderDelayMS() == -1) {
ret.put("close", false);
}
return new ResponseEntity<String>(ret.toString(),HttpStatus.OK);

View File

@ -512,7 +512,7 @@ public class MediaServerServiceImpl implements IMediaServerService {
param.put("hook.on_stream_not_found",String.format("%s/on_stream_not_found", hookPrex));
param.put("hook.on_server_keepalive",String.format("%s/on_server_keepalive", hookPrex));
param.put("hook.timeoutSec","20");
param.put("general.streamNoneReaderDelayMS","-1".equals(mediaServerItem.getStreamNoneReaderDelayMS())?"3600000":mediaServerItem.getStreamNoneReaderDelayMS() );
param.put("general.streamNoneReaderDelayMS",mediaServerItem.getStreamNoneReaderDelayMS()==-1?"3600000":mediaServerItem.getStreamNoneReaderDelayMS() );
JSONObject responseJSON = zlmresTfulUtils.setServerConfig(mediaServerItem, param);