close ws gracefully to avoid stale joiners
This commit is contained in:
1 parent
1dad19e6b6
commit
c89688afd2
9 files changed
+32
-14
No files matched your search
@@ -191,9 +191,7 @@ func (c *Client) Close() {
|
||||
c.wsMu.Lock()
|
||||
ws := c.ws
|
||||
c.wsMu.Unlock()
|
||||
if ws != nil {
|
||||
_ = ws.Close()
|
||||
}
|
||||
common.CloseWS(ws)
|
||||
if c.pubPC != nil {
|
||||
_ = c.pubPC.Close()
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user