mirror of
https://github.com/magefree/mage.git
synced 2026-01-10 21:02:08 -08:00
fixed issue 247
This commit is contained in:
parent
2c8f9ce688
commit
798eb7813b
2 changed files with 2 additions and 1 deletions
|
|
@ -88,7 +88,7 @@ public class ChatManager {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void removeUser(UUID userId) {
|
public void removeUser(UUID userId) {
|
||||||
for (ChatSession chat: chatSessions.values()) {
|
for (ChatSession chat: chatSessions.values()) {
|
||||||
chat.kill(userId);
|
chat.kill(userId);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -100,6 +100,7 @@ public class UserManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void disconnect(UUID userId) {
|
public void disconnect(UUID userId) {
|
||||||
|
ChatManager.getInstance().removeUser(userId);
|
||||||
if (users.containsKey(userId)) {
|
if (users.containsKey(userId)) {
|
||||||
logger.info("user disconnected " + userId);
|
logger.info("user disconnected " + userId);
|
||||||
users.get(userId).setSessionId("");
|
users.get(userId).setSessionId("");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue