处理disconnect的在线状态

This commit is contained in:
heavyrian2012
2022-03-23 19:55:58 +08:00
parent 4bc5fd6bb9
commit a3f2623d7e
2 changed files with 8 additions and 2 deletions
@@ -751,6 +751,7 @@ public class MemorySessionStore implements ISessionsStore {
public void disableSession(String userId, String clientId) {
Session session = sessions.get(clientId);
if (session != null && session.getDeleted() == 0 && (userId == null || session.getUsername().equals(userId))) {
mServer.getProcessor().processOffline(session, false);
databaseStore.updateSessionDeleted(session.getUsername(), clientId, 1);
ConcurrentSkipListSet<String> sessionSet = getUserSessionSet(session.username);
sessionSet.remove(clientId);
@@ -772,6 +773,7 @@ public class MemorySessionStore implements ISessionsStore {
return;
}
mServer.getProcessor().processOffline(session, true);
ConcurrentSkipListSet<String> sessionSet = getUserSessionSet(session.username);
sessionSet.remove(clientID);