mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-22 20:49:43 +00:00
Faster network stack on overflow conditions
This commit is contained in:
parent
06c57a3aae
commit
fc80a85c8c
1 changed files with 4 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue