|
|
@@ -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); |