diff options
author | Nathan Adams <dinnerbone@dinnerbone.com> | 2012-03-01 10:49:23 +0000 |
---|---|---|
committer | Nathan Adams <dinnerbone@dinnerbone.com> | 2012-03-01 14:38:31 +0000 |
commit | 543c4879fee3b7165764c5371d226c93fe3a657b (patch) | |
tree | 4fe9116464e1fe42a40dc3ba19b58234bd26f821 /src/main/java/net/minecraft/server/NetworkManager.java | |
parent | e9ca87000c1794715bc3fe0a7d1caaf809057635 (diff) | |
download | craftbukkit-543c4879fee3b7165764c5371d226c93fe3a657b.tar craftbukkit-543c4879fee3b7165764c5371d226c93fe3a657b.tar.gz craftbukkit-543c4879fee3b7165764c5371d226c93fe3a657b.tar.lz craftbukkit-543c4879fee3b7165764c5371d226c93fe3a657b.tar.xz craftbukkit-543c4879fee3b7165764c5371d226c93fe3a657b.zip |
Updated CraftBukkit to 1.2
Diffstat (limited to 'src/main/java/net/minecraft/server/NetworkManager.java')
-rw-r--r-- | src/main/java/net/minecraft/server/NetworkManager.java | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java index aad4c12a..a3d4d396 100644 --- a/src/main/java/net/minecraft/server/NetworkManager.java +++ b/src/main/java/net/minecraft/server/NetworkManager.java @@ -25,7 +25,7 @@ public class NetworkManager { private List highPriorityQueue = Collections.synchronizedList(new ArrayList()); private List lowPriorityQueue = Collections.synchronizedList(new ArrayList()); private NetHandler packetListener; - private boolean synched = false; + private boolean q = false; private Thread r; private Thread s; private boolean t = false; @@ -74,7 +74,7 @@ public class NetworkManager { } public void queue(Packet packet) { - if (!this.synched) { + if (!this.q) { Object object = this.g; synchronized (this.g) { @@ -153,7 +153,10 @@ public class NetworkManager { int i = packet.b(); aint[i] += packet.a() + 1; - this.m.add(packet); + if (!this.q) { + this.m.add(packet); + } + flag = true; } else { this.a("disconnect.endOfStream", new Object[0]); @@ -223,7 +226,7 @@ public class NetworkManager { while (!this.m.isEmpty() && i-- >= 0) { Packet packet = (Packet) this.m.remove(0); - if (!this.synched) packet.handle(this.packetListener); // CraftBukkit + if (!this.q) packet.handle(this.packetListener); // CraftBukkit } this.a(); @@ -237,9 +240,9 @@ public class NetworkManager { } public void d() { - if (!this.synched) { + if (!this.q) { this.a(); - this.synched = true; + this.q = true; this.s.interrupt(); (new NetworkMonitorThread(this)).start(); } @@ -258,7 +261,7 @@ public class NetworkManager { } static boolean b(NetworkManager networkmanager) { - return networkmanager.synched; + return networkmanager.q; } static boolean c(NetworkManager networkmanager) { |