Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-19 04:50:06 +01:00
Fixed Connection Throttle handling. Fixes BUKKIT-1279
Dieser Commit ist enthalten in:
Ursprung
8fb141bfa0
Commit
ddaf3c84d3
@ -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) {
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren