Fixed zero-length packets spamming the console

This commit is contained in:
Shoghi Cervantes 2013-12-03 02:07:33 +01:00
parent e9e59c33cc
commit bad8365e28

View File

@ -62,7 +62,7 @@ class MinecraftInterface{
$source = false;
$port = 1;
$len = $this->socket->read($buf, $source, $port);
if($len === false){
if($len === false and $len > 0){
return $pk;
}
$this->bandwidth[0] += $len;