Skip to content

Commit

Permalink
fix: client may remove hostclient incorrectly (#1461)
Browse files Browse the repository at this point in the history
  • Loading branch information
Duslia committed Dec 29, 2022
1 parent 9b4a7e5 commit e46afc3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client.go
Expand Up @@ -569,6 +569,7 @@ func (c *Client) mCleaner(m map[string]*HostClient) {
}

for {
time.Sleep(sleep)
c.mLock.Lock()
for k, v := range m {
v.connsLock.Lock()
Expand All @@ -585,7 +586,6 @@ func (c *Client) mCleaner(m map[string]*HostClient) {
if mustStop {
break
}
time.Sleep(sleep)
}
}

Expand Down

0 comments on commit e46afc3

Please sign in to comment.