Fix RTSP server close (panic) without client request #364
This commit is contained in:
+3
-1
@@ -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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user