releaseStream增加判空

This commit is contained in:
李宇翔
2021-06-08 19:22:01 +08:00
parent 64a2b5884c
commit bfe36b355c

View File

@@ -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"
}