diff options
author | Tahg <tahgtahv@gmail.com> | 2011-05-27 11:01:37 -0400 |
---|---|---|
committer | Erik Broes <erikbroes@grum.nl> | 2011-05-28 00:33:16 +0200 |
commit | 9ec5d8b5dfc544a6873aa1bb48a07deedd1751fb (patch) | |
tree | 44bd09960bc01b0d86f3724e07a3bcd488f016b4 /src/main/java/net/minecraft/server/NetworkManager.java | |
parent | 1784e42d5fe0ac465cda0fa5629ba06d16b90551 (diff) | |
download | craftbukkit-9ec5d8b5dfc544a6873aa1bb48a07deedd1751fb.tar craftbukkit-9ec5d8b5dfc544a6873aa1bb48a07deedd1751fb.tar.gz craftbukkit-9ec5d8b5dfc544a6873aa1bb48a07deedd1751fb.tar.lz craftbukkit-9ec5d8b5dfc544a6873aa1bb48a07deedd1751fb.tar.xz craftbukkit-9ec5d8b5dfc544a6873aa1bb48a07deedd1751fb.zip |
Improved packet handling
Diffstat (limited to 'src/main/java/net/minecraft/server/NetworkManager.java')
-rw-r--r-- | src/main/java/net/minecraft/server/NetworkManager.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java index f2bcbb72..b995864a 100644 --- a/src/main/java/net/minecraft/server/NetworkManager.java +++ b/src/main/java/net/minecraft/server/NetworkManager.java @@ -105,7 +105,8 @@ public class NetworkManager { flag = true; } - if (this.z-- <= 0 && !this.o.isEmpty() && (this.f == 0 || System.currentTimeMillis() - ((Packet) this.o.get(0)).timestamp >= (long) this.f)) { + // CraftBukkit - add 'flag' + if ((!flag || 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) { packet = (Packet) this.o.remove(0); |