Skip to content

Commit

Permalink
dont' send eviction message to multi session
Browse files Browse the repository at this point in the history
  • Loading branch information
or-else committed Jun 5, 2020
1 parent c392e90 commit 5fce7fb
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions server/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -627,15 +627,10 @@ func replyDelUser(s *Session, msg *ClientComMessage) {

s.queueOut(reply)

if s.uid == uid {
if s.uid == uid && s.multi == nil {
// Evict the current session if it belongs to the deleted user.
evict := NoErrEvicted("", "", msg.timestamp)
evict.AsUser = uid.UserId()
if s.multi != nil {
s.multi.stop <- s.multi.serialize(evict)
} else {
s.stop <- s.serialize(evict)
}
// No need to send it to multiplexing session: remote node will be notified separately.
s.stop <- s.serialize(NoErrEvicted("", "", msg.timestamp))
}
}

Expand Down

0 comments on commit 5fce7fb

Please sign in to comment.