Improved packet handling

This commit is contained in:
Tahg
2011-05-27 11:01:37 -04:00
committed by Erik Broes
parent 1784e42d5f
commit 9ec5d8b5df
2 changed files with 11 additions and 1 deletions

View File

@@ -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);