fix: sync close ws conn when kick old user avoid wrong trigger order about online status. (#1368)

This commit is contained in:
Gordon
2023-11-08 18:17:09 +08:00
committed by GitHub
parent 3ba861fd90
commit b562da5c37
2 changed files with 4 additions and 7 deletions
+3 -1
View File
@@ -297,7 +297,9 @@ func (c *Client) KickOnlineMessage() error {
resp := Resp{
ReqIdentifier: WSKickOnlineMsg,
}
return c.writeBinaryMsg(resp)
err := c.writeBinaryMsg(resp)
c.close()
return err
}
func (c *Client) writeBinaryMsg(resp Resp) error {