mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-23 08:46:44 +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) {
|
if (socket != null) {
|
||||||
synchronized (NetworkListenThread.getRecentConnectionAttempts(this.listenThread)) {
|
synchronized (NetworkListenThread.getRecentConnectionAttempts(this.listenThread)) {
|
||||||
InetAddress inetaddress = socket.getInetAddress();
|
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
|
// CraftBukkit
|
||||||
if (NetworkListenThread.getRecentConnectionAttempts(this.listenThread).containsKey(inetaddress) && System.currentTimeMillis() - ((Long) NetworkListenThread.getRecentConnectionAttempts(this.listenThread).get(inetaddress)).longValue() < connectionThrottle) {
|
if (NetworkListenThread.getRecentConnectionAttempts(this.listenThread).containsKey(inetaddress) && System.currentTimeMillis() - ((Long) NetworkListenThread.getRecentConnectionAttempts(this.listenThread).get(inetaddress)).longValue() < connectionThrottle) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue