From bfe36b355cd56fc9ec79e5b53adc1878b97cd4b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=AE=87=E7=BF=94?= <11123448@vivo.xyz> Date: Tue, 8 Jun 2021 19:22:01 +0800 Subject: [PATCH] =?UTF-8?q?releaseStream=E5=A2=9E=E5=8A=A0=E5=88=A4?= =?UTF-8?q?=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- netStream.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/netStream.go b/netStream.go index 055ef62..fa53408 100644 --- a/netStream.go +++ b/netStream.go @@ -183,7 +183,9 @@ func processRtmp(conn net.Conn) { amfobj := newAMFObjects() if s := FindStream(streamPath); s != nil { amfobj["level"] = "_result" - s.Close() + if s.Publisher != nil { + s.Close() + } } else { amfobj["level"] = "_error" }