Skip to content

Commit

Permalink
fix: PCAndOther multi login policy can`t get old clients correctly (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
icey-yu authored Feb 24, 2025
1 parent df1c8df commit 46f1a9c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions internal/msggateway/ws_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,15 @@ func (ws *WsServer) multiTerminalLoginChecker(clientOK bool, oldClients []*Clien
if constant.PlatformIDToClass(newClient.PlatformID) == constant.TerminalPC {
return
}
clients, ok := ws.clients.GetAll(newClient.UserID)
clientOK = ok
oldClients = make([]*Client, 0, len(clients))
for _, c := range clients {
if constant.PlatformIDToClass(c.PlatformID) == constant.TerminalPC {
continue
}
oldClients = append(oldClients, c)
}
fallthrough
case constant.AllLoginButSameTermKick:
if !clientOK {
Expand Down

0 comments on commit 46f1a9c

Please sign in to comment.