diff --git a/rtmp/channel.go b/rtmp/channel.go index 666dca83..e471c1ca 100644 --- a/rtmp/channel.go +++ b/rtmp/channel.go @@ -66,6 +66,7 @@ func (c *client) ticker(ctx context.Context) { func (c *client) Close() { c.cancel() c.conn.Close() + c.collector.Close(c.id) } // channel represents a stream that is sent to the server diff --git a/srt/channel.go b/srt/channel.go index ee2fbad9..1f7fc3a6 100644 --- a/srt/channel.go +++ b/srt/channel.go @@ -68,6 +68,7 @@ func (c *client) ticker(ctx context.Context) { func (c *client) Close() { c.cancel() c.conn.Close() + c.collector.Close(c.id) } // channel represents a stream that is sent to the server