diff options
Diffstat (limited to 'src/main/java/net/minecraft/server/NetworkAcceptThread.java')
-rw-r--r-- | src/main/java/net/minecraft/server/NetworkAcceptThread.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/net/minecraft/server/NetworkAcceptThread.java b/src/main/java/net/minecraft/server/NetworkAcceptThread.java index 005d61bb..2937aee8 100644 --- a/src/main/java/net/minecraft/server/NetworkAcceptThread.java +++ b/src/main/java/net/minecraft/server/NetworkAcceptThread.java @@ -10,6 +10,8 @@ class NetworkAcceptThread extends Thread { final NetworkListenThread listenThread; + long connectionThrottle; // CraftBukkit + NetworkAcceptThread(NetworkListenThread networklistenthread, String s, MinecraftServer minecraftserver) { super(s); this.listenThread = networklistenthread; @@ -24,9 +26,10 @@ class NetworkAcceptThread extends Thread { if (socket != null) { synchronized (NetworkListenThread.getRecentConnectionAttempts(this.listenThread)) { InetAddress inetaddress = socket.getInetAddress(); + connectionThrottle = this.a.server.getConnectionThrottle(); // CraftBukkit // CraftBukkit - if (NetworkListenThread.getRecentConnectionAttempts(this.listenThread).containsKey(inetaddress) && System.currentTimeMillis() - ((Long) NetworkListenThread.getRecentConnectionAttempts(this.listenThread).get(inetaddress)).longValue() < 4000L) { + if (NetworkListenThread.getRecentConnectionAttempts(this.listenThread).containsKey(inetaddress) && System.currentTimeMillis() - ((Long) NetworkListenThread.getRecentConnectionAttempts(this.listenThread).get(inetaddress)).longValue() < connectionThrottle) { NetworkListenThread.getRecentConnectionAttempts(this.listenThread).put(inetaddress, Long.valueOf(System.currentTimeMillis())); socket.close(); continue; |