fix: multiple gateway kick user each other.

Signed-off-by: Gordon <46924906+FGadvancer@users.noreply.github.com>
pull/943/head
Gordon 2 years ago
parent 1c6b2de93a
commit fb7e6d3635

@ -279,7 +279,10 @@ func (ws *WsServer) multiTerminalLoginChecker(clientOK bool, oldClients []*Clien
fallthrough
case constant.AllLoginButSameTermKick:
if clientOK {
ws.clients.deleteClients(newClient.UserID, oldClients)
isDeleteUser := ws.clients.deleteClients(newClient.UserID, oldClients)
if isDeleteUser {
atomic.AddInt64(&ws.onlineUserNum, -1)
}
for _, c := range oldClients {
err := c.KickOnlineMessage()
if err != nil {

Loading…
Cancel
Save