Update netty and watchdog

Dieser Commit ist enthalten in:
md_5 2013-07-02 13:36:58 +10:00
Ursprung 40a2f5b7ad
Commit 8752e9f61f
2 geänderte Dateien mit 10 neuen und 10 gelöschten Zeilen

Datei anzeigen

@ -1,4 +1,4 @@
From 4c3d662a619c6b2d4c5a8d44e607e38c46896eff Mon Sep 17 00:00:00 2001
From ff71078f488cce72dd54bec2ac18c9ca848d0bae Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Sat, 23 Feb 2013 12:33:20 +1100
Subject: [PATCH] Watchdog Thread.
@ -26,7 +26,7 @@ index f114444..399db47 100644
} catch (Throwable throwable1) {
diff --git a/src/main/java/org/spigotmc/RestartCommand.java b/src/main/java/org/spigotmc/RestartCommand.java
new file mode 100644
index 0000000..a5c4549
index 0000000..c8125c2
--- /dev/null
+++ b/src/main/java/org/spigotmc/RestartCommand.java
@@ -0,0 +1,111 @@
@ -84,7 +84,7 @@ index 0000000..a5c4549
+ {
+ }
+ // Close the socket so we can rebind with the new process
+ MinecraftServer.getServer().ae().a();
+ MinecraftServer.getServer().ag().a();
+
+ // Give time for it to kick in
+ try

Datei anzeigen

@ -1,4 +1,4 @@
From e41efeccf1261e150d39a8927143ad629511d45c Mon Sep 17 00:00:00 2001
From b33c1c06c7b5397e35bf3eba3aeb61c29fa8549e Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au>
Date: Tue, 2 Jul 2013 09:06:29 +1000
Subject: [PATCH] Netty
@ -95,7 +95,7 @@ index c60abf1..e1b259b 100644
+ public void setSocketAddress(SocketAddress address) { k = address; } // Spigot
}
diff --git a/src/main/java/net/minecraft/server/PendingConnection.java b/src/main/java/net/minecraft/server/PendingConnection.java
index 252cea7..d0ccbff 100644
index 252cea7..d07973d 100644
--- a/src/main/java/net/minecraft/server/PendingConnection.java
+++ b/src/main/java/net/minecraft/server/PendingConnection.java
@@ -16,7 +16,7 @@ public class PendingConnection extends Connection {
@ -129,7 +129,7 @@ index 252cea7..d0ccbff 100644
// CraftBukkit
org.bukkit.event.server.ServerListPingEvent pingEvent = org.bukkit.craftbukkit.event.CraftEventFactory.callServerListPingEvent(this.server.server, getSocket().getInetAddress(), this.server.getMotd(), playerlist.getPlayerCount(), playerlist.getMaxPlayers());
- if (packet254getinfo.d()) {
+ if (galse) { // Spigot: TODO: Use trick from Bungee maybe?
+ if (false) { // Spigot: TODO: Use trick from Bungee maybe?
// CraftBukkit
s = pingEvent.getMotd() + "\u00A7" + playerlist.getPlayerCount() + "\u00A7" + pingEvent.getMaxPlayers();
} else {
@ -147,7 +147,7 @@ index 252cea7..d0ccbff 100644
+ ((DedicatedServerConnection) this.server.ag()).a(inetaddress);
+ } else
+ {
+ ((org.spigotmc.netty.NettyServerConnection)this.server.ae()).unThrottle( inetaddress );
+ ((org.spigotmc.netty.NettyServerConnection)this.server.ag()).unThrottle( inetaddress );
+ }
}
+ // Spigot end
@ -369,7 +369,7 @@ index 0000000..2eb1dcb
+}
diff --git a/src/main/java/org/spigotmc/netty/NettyNetworkManager.java b/src/main/java/org/spigotmc/netty/NettyNetworkManager.java
new file mode 100644
index 0000000..5e2b104
index 0000000..7340f5a
--- /dev/null
+++ b/src/main/java/org/spigotmc/netty/NettyNetworkManager.java
@@ -0,0 +1,314 @@
@ -411,8 +411,8 @@ index 0000000..5e2b104
+
+ private static final ExecutorService threadPool = Executors.newCachedThreadPool( new ThreadFactoryBuilder().setNameFormat( "Async Packet Handler - %1$d" ).build() );
+ private static final MinecraftServer server = MinecraftServer.getServer();
+ private static final PrivateKey key = server.F().getPrivate();
+ private static final NettyServerConnection serverConnection = (NettyServerConnection) server.ae();
+ private static final PrivateKey key = server.H().getPrivate();
+ private static final NettyServerConnection serverConnection = (NettyServerConnection) server.ag();
+ /*========================================================================*/
+ private final Queue<Packet> syncPackets = new ConcurrentLinkedQueue<Packet>();
+ private final List<Packet> highPriorityQueue = new AbstractList<Packet>()