Fix mutex lock after #339

This commit is contained in:
Alexey Khit
2023-04-15 07:53:26 +03:00
parent d633d331bb
commit 8dd9991268
+2 -1
View File
@@ -310,7 +310,8 @@ func (c *Conn) SetupMedia(media *core.Media, first bool) (byte, error) {
// some Dahua/Amcrest cameras fail here because two simultaneous
// backchannel connections
if c.Backchannel {
c.Close()
_ = c.conn.Close()
c.Backchannel = false
if err := c.Dial(); err != nil {
return 0, err