👌 IMPROVE: 添加初始化监听失败日志

This commit is contained in:
dexter
2022-10-03 17:57:49 +08:00
parent 022857c3d7
commit 2e6679b3ea

View File

@@ -37,7 +37,10 @@ func (conf *RTSPConfig) OnEvent(event any) {
MulticastRTPPort: 8002,
MulticastRTCPPort: 8003,
}
s.Start()
if err := s.Start(); err != nil {
RTSPPlugin.Error("server start", zap.Error(err))
v["enabled"] = false
}
if conf.PullOnStart {
for streamPath, url := range conf.PullList {
if err := RTSPPlugin.Pull(streamPath, url, new(RTSPPuller), false); err != nil {