From 2e6679b3ea3830ebe51398229699e78de9ecfb6e Mon Sep 17 00:00:00 2001 From: dexter <178529795@qq.com> Date: Mon, 3 Oct 2022 17:57:49 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=8C=20IMPROVE:=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96=E7=9B=91=E5=90=AC=E5=A4=B1=E8=B4=A5?= =?UTF-8?q?=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index e199bc2..0d558e9 100644 --- a/main.go +++ b/main.go @@ -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 {