修复当注销流时没有与之关联的国标通道时会出现的NPE

This commit is contained in:
Kairlec
2024-10-15 14:53:13 +08:00
parent 38f476c86b
commit feb08dfc4a

View File

@@ -284,7 +284,10 @@ public class StreamPushServiceImpl implements IStreamPushService {
}
streamPush.setPushing(false);
if (userSetting.isUsePushingAsStatus()) {
gbChannelService.offline(streamPush.buildCommonGBChannel());
CommonGBChannel commonGBChannel = streamPush.buildCommonGBChannel();
if (commonGBChannel != null) {
gbChannelService.offline(commonGBChannel);
}
}
sendRtpServerService.deleteByStream(streamPush.getStream());
mediaServerService.stopSendRtp(mediaServer, streamPush.getApp(), streamPush.getStream(), null);