Fix RTSP server close (panic) without client request #364

This commit is contained in:
Alexey Khit
2023-04-19 12:35:02 +03:00
parent 5926c1deb9
commit e8b22bca99
+3 -1
View File
@@ -288,6 +288,8 @@ func (c *Conn) Teardown() (err error) {
}
func (c *Conn) Close() error {
_ = c.Teardown()
if c.mode == core.ModeActiveProducer {
_ = c.Teardown()
}
return c.conn.Close()
}