Correctly register pending connection when using legacy network handler.

This commit is contained in:
md_5 2013-04-23 19:07:40 +10:00
parent 57cabfb59d
commit 3d29043ccb

View File

@ -1,4 +1,4 @@
From 1890313f461b35a0e1807543cac1b8881d984827 Mon Sep 17 00:00:00 2001 From 581d883c923294c725f719f2061591c9525d6565 Mon Sep 17 00:00:00 2001
From: md_5 <md_5@live.com.au> From: md_5 <md_5@live.com.au>
Date: Tue, 23 Apr 2013 11:47:32 +1000 Date: Tue, 23 Apr 2013 11:47:32 +1000
Subject: [PATCH] Netty Subject: [PATCH] Netty
@ -73,6 +73,19 @@ index bd7e41c..b04d8a1 100644
if (!this.getOnlineMode()) { if (!this.getOnlineMode()) {
this.getLogger().warning("**** SERVER IS RUNNING IN OFFLINE/INSECURE MODE!"); this.getLogger().warning("**** SERVER IS RUNNING IN OFFLINE/INSECURE MODE!");
this.getLogger().warning("The server will make no attempt to authenticate usernames. Beware."); this.getLogger().warning("The server will make no attempt to authenticate usernames. Beware.");
diff --git a/src/main/java/net/minecraft/server/DedicatedServerConnectionThread.java b/src/main/java/net/minecraft/server/DedicatedServerConnectionThread.java
index ef7e10d..4638983 100644
--- a/src/main/java/net/minecraft/server/DedicatedServerConnectionThread.java
+++ b/src/main/java/net/minecraft/server/DedicatedServerConnectionThread.java
@@ -82,7 +82,7 @@ public class DedicatedServerConnectionThread extends Thread {
PendingConnection pendingconnection = new PendingConnection(this.e.d(), socket, "Connection #" + this.c++);
- this.a(pendingconnection);
+ ((org.spigotmc.MultiplexingServerConnection) this.e).register(pendingconnection); // Spigot
} catch (IOException ioexception) {
this.e.d().getLogger().warning("DSCT: " + ioexception.getMessage()); // CraftBukkit
}
diff --git a/src/main/java/net/minecraft/server/INetworkManager.java b/src/main/java/net/minecraft/server/INetworkManager.java diff --git a/src/main/java/net/minecraft/server/INetworkManager.java b/src/main/java/net/minecraft/server/INetworkManager.java
new file mode 100644 new file mode 100644
index 0000000..6fcc5d7 index 0000000..6fcc5d7