mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-09 21:24:53 +00:00
Faster network stack on overflow conditions
This commit is contained in:
parent
06c57a3aae
commit
fc80a85c8c
@ -114,7 +114,10 @@ class MinecraftInterface{
|
|||||||
|
|
||||||
public function popPacket(){
|
public function popPacket(){
|
||||||
if(count($this->data) > 0){
|
if(count($this->data) > 0){
|
||||||
$p = array_shift($this->data);
|
$p = each($this->data);
|
||||||
|
unset($this->data[$p[0]]);
|
||||||
|
$p = $p[1];
|
||||||
|
|
||||||
if(isset($p[1]["packets"]) and is_array($p[1]["packets"])){
|
if(isset($p[1]["packets"]) and is_array($p[1]["packets"])){
|
||||||
foreach($p[1]["packets"] as $d){
|
foreach($p[1]["packets"] as $d){
|
||||||
$this->data[] = array($p[0], $d[1], $d[2], $p[3], $p[4]);
|
$this->data[] = array($p[0], $d[1], $d[2], $p[3], $p[4]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user