From 723a671f1c22681bafdeaebd31070c302efb554f Mon Sep 17 00:00:00 2001 From: Gabe Kangas Date: Wed, 4 Nov 2020 22:33:56 -0800 Subject: [PATCH] Stop handleDisconnect from double firing --- core/rtmp/rtmp.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/rtmp/rtmp.go b/core/rtmp/rtmp.go index 90cbdf702..7173f0da8 100644 --- a/core/rtmp/rtmp.go +++ b/core/rtmp/rtmp.go @@ -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()