Stop handleDisconnect from double firing

This commit is contained in:
Gabe Kangas
2020-11-05 00:15:00 -08:00
parent 28f965ec32
commit 723a671f1c
+4
View File
@@ -123,6 +123,10 @@ func HandleConn(c *rtmp.Conn, nc net.Conn) {
}
func handleDisconnect(conn net.Conn) {
if !_hasInboundRTMPConnection {
return
}
log.Infoln("RTMP disconnected.")
conn.Close()
_pipe.Close()