diff options
author | Erik Broes <erikbroes@grum.nl> | 2011-05-26 16:20:11 +0200 |
---|---|---|
committer | Erik Broes <erikbroes@grum.nl> | 2011-05-26 16:20:11 +0200 |
commit | 5e1c969af27c7aa1f1f73a14db5d26da179e3f27 (patch) | |
tree | 4187bc87868686e21c8c6a4d1831ea100a4e8037 /src/main/java | |
parent | dc76d3a64a8baa6cae9cfebf17f4459eb61495c2 (diff) | |
download | craftbukkit-5e1c969af27c7aa1f1f73a14db5d26da179e3f27.tar craftbukkit-5e1c969af27c7aa1f1f73a14db5d26da179e3f27.tar.gz craftbukkit-5e1c969af27c7aa1f1f73a14db5d26da179e3f27.tar.lz craftbukkit-5e1c969af27c7aa1f1f73a14db5d26da179e3f27.tar.xz craftbukkit-5e1c969af27c7aa1f1f73a14db5d26da179e3f27.zip |
Update for 1.6.4
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/net/minecraft/server/NetworkManager.java | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java index f463aa58..f2bcbb72 100644 --- a/src/main/java/net/minecraft/server/NetworkManager.java +++ b/src/main/java/net/minecraft/server/NetworkManager.java @@ -82,7 +82,9 @@ public class NetworkManager { } } - private void f() { + private boolean f() { + boolean flag = false; + try { Object object; Packet packet; @@ -100,9 +102,9 @@ public class NetworkManager { aint = e; i = packet.b(); aint[i] += packet.a(); + flag = true; } - // Craftbukkit - we used to enforce package priorities, we don't now. Do we need to redo this? - TODO if (this.z-- <= 0 && !this.o.isEmpty() && (this.f == 0 || System.currentTimeMillis() - ((Packet) this.o.get(0)).timestamp >= (long) this.f)) { object = this.g; synchronized (this.g) { @@ -115,19 +117,24 @@ public class NetworkManager { i = packet.b(); aint[i] += packet.a(); this.z = 50; + flag = true; } } catch (Exception exception) { if (!this.t) { this.a(exception); } } + + return flag; } public void a() { this.y = true; } - private void g() { + private boolean g() { + boolean flag = false; + try { Packet packet = Packet.a(this.input, this.p.c()); @@ -137,6 +144,7 @@ public class NetworkManager { aint[i] += packet.a(); this.m.add(packet); + flag = true; } else { this.a("disconnect.endOfStream", new Object[0]); } @@ -145,6 +153,8 @@ public class NetworkManager { this.a(exception); } } + + return flag; } private void a(Exception exception) { @@ -232,12 +242,12 @@ public class NetworkManager { return networkmanager.q; } - static void c(NetworkManager networkmanager) { - networkmanager.g(); + static boolean c(NetworkManager networkmanager) { + return networkmanager.g(); } - static void d(NetworkManager networkmanager) { - networkmanager.f(); + static boolean d(NetworkManager networkmanager) { + return networkmanager.f(); } static boolean e(NetworkManager networkmanager) { |