优化对讲逻辑

This commit is contained in:
648540858
2022-07-03 00:44:36 +08:00
parent b6c97528ae
commit 72c1b36d6d
5 changed files with 128 additions and 106 deletions

View File

@@ -294,11 +294,11 @@ public class ZLMRTPServerFactory {
return 0;
}
Integer code = mediaInfo.getInteger("code");
if ( code < 0) {
if (code < 0) {
logger.warn("查询流({}/{})是否有其它观看者时得到: {}", app, streamId, mediaInfo.getString("msg"));
return -1;
}
if ( code == 0 && ! mediaInfo.getBoolean("online")) {
if ( code == 0 && mediaInfo.getBoolean("online") != null && ! mediaInfo.getBoolean("online")) {
logger.warn("查询流({}/{})是否有其它观看者时得到: {}", app, streamId, mediaInfo.getString("msg"));
return -1;
}