Browse Source

fix client removal from path in case of errors during setup

pull/169/head
aler9 5 years ago
parent
commit
0839a853a8
  1. 14
      client/client.go

14
client/client.go

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

Loading…
Cancel
Save