mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-05 18:27:17 +01:00
Fixed Connection Throttle handling. Fixes BUKKIT-1279
This commit is contained in:
parent
8fb141bfa0
commit
ddaf3c84d3
1 changed files with 7 additions and 1 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue