diff --git a/hub.go b/hub.go index a122de9..5a33bde 100644 --- a/hub.go +++ b/hub.go @@ -1719,11 +1719,11 @@ func (h *Hub) processRoom(sess Session, message *ClientMessage) { if roomId == "" { // We can handle leaving a room directly. if session.LeaveRoomWithMessage(true, message) != nil { - // User was in a room before, so need to notify about leaving it. - h.sendRoom(session, message, nil) if session.UserId() == "" && session.ClientType() != HelloClientTypeInternal { h.startWaitAnonymousSessionRoom(session) } + // User was in a room before, so need to notify about leaving it. + h.sendRoom(session, message, nil) } return