Minor Loginserver improvements.

This commit is contained in:
MobiusDev 2015-03-18 14:37:56 +00:00
parent 5e9f7be295
commit 3ebaecf37e
2 changed files with 4 additions and 4 deletions

View File

@ -22,8 +22,8 @@ import java.io.IOException;
import java.net.InetAddress; import java.net.InetAddress;
import java.net.ServerSocket; import java.net.ServerSocket;
import java.net.Socket; import java.net.Socket;
import java.util.HashMap;
import java.util.Map; import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.logging.Level; import java.util.logging.Level;
import java.util.logging.Logger; import java.util.logging.Logger;
@ -35,7 +35,7 @@ import com.l2jserver.Config;
public abstract class FloodProtectedListener extends Thread public abstract class FloodProtectedListener extends Thread
{ {
private final Logger _log = Logger.getLogger(FloodProtectedListener.class.getName()); private final Logger _log = Logger.getLogger(FloodProtectedListener.class.getName());
private final Map<String, ForeignConnection> _floodProtection = new HashMap<>(); private final Map<String, ForeignConnection> _floodProtection = new ConcurrentHashMap<>();
private ServerSocket _serverSocket; private ServerSocket _serverSocket;
public FloodProtectedListener(String listenIp, int port) throws IOException public FloodProtectedListener(String listenIp, int port) throws IOException

View File

@ -26,8 +26,8 @@ import java.net.Socket;
import java.security.KeyPair; import java.security.KeyPair;
import java.security.interfaces.RSAPrivateKey; import java.security.interfaces.RSAPrivateKey;
import java.security.interfaces.RSAPublicKey; import java.security.interfaces.RSAPublicKey;
import java.util.HashSet;
import java.util.Set; import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.logging.Logger; import java.util.logging.Logger;
import com.l2jserver.Config; import com.l2jserver.Config;
@ -63,7 +63,7 @@ public class GameServerThread extends Thread
private GameServerInfo _gsi; private GameServerInfo _gsi;
/** Authed Clients on a GameServer */ /** Authed Clients on a GameServer */
private final Set<String> _accountsOnGameServer = new HashSet<>(); private final Set<String> _accountsOnGameServer = ConcurrentHashMap.newKeySet();
private String _connectionIPAddress; private String _connectionIPAddress;