推流不稳定问题修复
This commit is contained in:
parent
2843072216
commit
ab34fa7113
|
|
@ -249,7 +249,7 @@ public class CommandManagerImpl implements CommandManager {
|
|||
}
|
||||
}
|
||||
if (config.isDebug())
|
||||
log.info("停止了" + index + "个任务!");
|
||||
log.info("停止了" + index + "个任务!名称:{}",index>0?tasker.getId():"null");
|
||||
return index;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -338,10 +338,32 @@ public class RtmpLiveService {
|
|||
oldMsg=map1.get("oldMsg")==null?"":map1.get("oldMsg").toString();
|
||||
oldtime=Long.parseLong(map1.get("oldtime")==null?"0":map1.get("oldtime").toString());
|
||||
}
|
||||
if (status==0){
|
||||
if (status==0&&manager.queryAll().size()>0){
|
||||
log.info("停止推流20");
|
||||
if (manager.queryAll().size()>0){
|
||||
manager.stopAll();
|
||||
manager.destory();
|
||||
}
|
||||
Thread.sleep(5000);
|
||||
if (manager.queryAll().size()>0){
|
||||
log.info("延迟检测推流1");
|
||||
manager.stopAll();
|
||||
manager.destory();
|
||||
}
|
||||
log.info("无任务,停止监听1");
|
||||
break;
|
||||
}
|
||||
Thread.sleep(200);
|
||||
if (status==0&&manager.queryAll().size()==0){
|
||||
log.info("无任务,停止监听2");
|
||||
Thread.sleep(5000);
|
||||
if (manager.queryAll().size()>0){
|
||||
log.info("延迟检测推流关闭");
|
||||
manager.stopAll();
|
||||
manager.destory();
|
||||
}
|
||||
break;
|
||||
}
|
||||
Thread.sleep(400);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -368,7 +390,6 @@ public class RtmpLiveService {
|
|||
log.info("推流失败,重新推流");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Map map = new HashMap();
|
||||
map.put("oldtime",oldtime);
|
||||
|
|
|
|||
Loading…
Reference in New Issue