From 5d5af5601f064b9ed9ea9db45b868670e01a9f42 Mon Sep 17 00:00:00 2001 From: Saxon Date: Mon, 25 Feb 2019 17:00:31 +1030 Subject: [PATCH] revid: not closing destinations on call to revid.Reset() anymore --- revid/revid.go | 9 --------- rtmp/conn.go | 2 +- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/revid/revid.go b/revid/revid.go index 02174da2..a5efa44d 100644 --- a/revid/revid.go +++ b/revid/revid.go @@ -231,15 +231,6 @@ func (r *Revid) reset(config Config) error { r.buffer = ring.NewBuffer(ringBufferSize, ringBufferElementSize, writeTimeout) - for _, dest := range r.destination { - if dest != nil { - err = dest.close() - if err != nil { - return err - } - } - } - r.destination = r.destination[:0] for _, typ := range r.config.Outputs { switch typ { diff --git a/rtmp/conn.go b/rtmp/conn.go index 4249a637..7e1b3b15 100644 --- a/rtmp/conn.go +++ b/rtmp/conn.go @@ -134,10 +134,10 @@ func Dial(url string, timeout uint, log Log) (*Conn, error) { // Close terminates the RTMP connection. // NB: Close is idempotent and the connection value is cleared completely. func (c *Conn) Close() error { + c.log(DebugLevel, pkg+"Conn.Close") if !c.isConnected() { return errNotConnected } - c.log(DebugLevel, pkg+"Conn.Close") if c.streamID > 0 { if c.link.protocol&featureWrite != 0 { sendFCUnpublish(c)