Fix RTSP server close (panic) without client request #364
This commit is contained in:
@@ -288,6 +288,8 @@ func (c *Conn) Teardown() (err error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (c *Conn) Close() error {
|
func (c *Conn) Close() error {
|
||||||
|
if c.mode == core.ModeActiveProducer {
|
||||||
_ = c.Teardown()
|
_ = c.Teardown()
|
||||||
|
}
|
||||||
return c.conn.Close()
|
return c.conn.Close()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user