fix client removal from path in case of errors during setup

This commit is contained in:
aler9 2020-10-25 19:34:54 +01:00
parent dfcf80b2df
commit 0839a853a8

View file

@ -210,6 +210,11 @@ func (c *Client) run() {
}
}
if c.path != nil {
c.path.OnClientRemove(c)
c.path = nil
}
if onConnectCmd != nil {
onConnectCmd.Close()
}
@ -901,9 +906,6 @@ func (c *Client) runWaitingDescribe() bool {
}
}()
c.path.OnClientRemove(c)
c.path = nil
c.conn.Close()
return false
}
@ -939,9 +941,6 @@ func (c *Client) runPlay() bool {
onReadCmd.Close()
}
c.path.OnClientRemove(c)
c.path = nil
return false
}
@ -1126,9 +1125,6 @@ func (c *Client) runRecord() bool {
}
}
c.path.OnClientRemove(c)
c.path = nil
return false
}