Some more changes to the user handling.

This commit is contained in:
LevelX2 2017-08-18 00:12:38 +02:00
parent cb8b4d8cbf
commit fea9dfe8f8
8 changed files with 118 additions and 76 deletions

View file

@ -27,6 +27,9 @@
*/
package mage.server;
import java.text.DateFormat;
import java.util.*;
import java.util.concurrent.ConcurrentHashMap;
import mage.interfaces.callback.ClientCallback;
import mage.interfaces.callback.ClientCallbackMethod;
import mage.view.ChatMessage;
@ -35,10 +38,6 @@ import mage.view.ChatMessage.MessageType;
import mage.view.ChatMessage.SoundToPlay;
import org.apache.log4j.Logger;
import java.text.DateFormat;
import java.util.*;
import java.util.concurrent.ConcurrentHashMap;
/**
* @author BetaSteward_at_googlemail.com
*/
@ -78,7 +77,7 @@ public class ChatSession {
}
if (userId != null && clients.containsKey(userId)) {
String userName = clients.get(userId);
if (reason != DisconnectReason.LostConnection) { // for lost connection the user will be reconnected or session expire so no remove of chat yet
if (reason != DisconnectReason.LostConnection) { // for lost connection the user will be reconnected or session expire so no removeUserFromAllTables of chat yet
clients.remove(userId);
logger.debug(userName + '(' + reason.toString() + ')' + " removed from chatId " + chatId);
}