diff options
author | EvilSeph <evilseph@gmail.com> | 2012-03-22 18:54:30 -0400 |
---|---|---|
committer | EvilSeph <evilseph@gmail.com> | 2012-03-22 18:57:02 -0400 |
commit | ddaf3c84d36f55fc4a80793dd41e64d711fb1c93 (patch) | |
tree | a086ffd0488bae2e958ae514f18f246e070835e7 /src/main | |
parent | 8fb141bfa0b8d01de6c4680e69f1c29a0acc51d8 (diff) | |
download | craftbukkit-ddaf3c84d36f55fc4a80793dd41e64d711fb1c93.tar craftbukkit-ddaf3c84d36f55fc4a80793dd41e64d711fb1c93.tar.gz craftbukkit-ddaf3c84d36f55fc4a80793dd41e64d711fb1c93.tar.lz craftbukkit-ddaf3c84d36f55fc4a80793dd41e64d711fb1c93.tar.xz craftbukkit-ddaf3c84d36f55fc4a80793dd41e64d711fb1c93.zip |
Fixed Connection Throttle handling. Fixes BUKKIT-1279
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/net/minecraft/server/NetworkAcceptThread.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/main/java/net/minecraft/server/NetworkAcceptThread.java b/src/main/java/net/minecraft/server/NetworkAcceptThread.java index 2937aee8..75985a3c 100644 --- a/src/main/java/net/minecraft/server/NetworkAcceptThread.java +++ b/src/main/java/net/minecraft/server/NetworkAcceptThread.java @@ -26,7 +26,13 @@ class NetworkAcceptThread extends Thread { if (socket != null) { synchronized (NetworkListenThread.getRecentConnectionAttempts(this.listenThread)) { InetAddress inetaddress = socket.getInetAddress(); - connectionThrottle = this.a.server.getConnectionThrottle(); // CraftBukkit + // CraftBukkit start + if (this.a.server == null) { + socket.close(); + continue; + } + connectionThrottle = this.a.server.getConnectionThrottle(); + // CraftBukkit end // CraftBukkit if (NetworkListenThread.getRecentConnectionAttempts(this.listenThread).containsKey(inetaddress) && System.currentTimeMillis() - ((Long) NetworkListenThread.getRecentConnectionAttempts(this.listenThread).get(inetaddress)).longValue() < connectionThrottle) { |