From 57df6e61aaa0fcaf9dae9c1779ae7334638ffc1a Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Pueyo Date: Wed, 20 Mar 2013 18:14:04 +0100 Subject: [PATCH] Raised buffer time --- src/Player.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Player.php b/src/Player.php index 85dad19f..652189b1 100644 --- a/src/Player.php +++ b/src/Player.php @@ -30,7 +30,7 @@ class Player{ private $server; private $queue = array(); private $buffer = ""; - private $lastBuffer = 0; + private $nextBuffer = 0; private $recovery = array(); private $evid = array(); public $lastMovement = 0; @@ -155,7 +155,7 @@ class Player{ if($time > $this->timeout){ $this->close("timeout"); }else{ - if($this->lastBuffer <= $time and strlen($this->buffer) > 0){ + if($this->nextBuffer <= $time and strlen($this->buffer) > 0){ $this->sendBuffer(); } @@ -1029,7 +1029,7 @@ class Player{ } $this->buffer = ""; - $this->lastBuffer = microtime(true) + 0.05; + $this->nextBuffer = microtime(true) + 0.1; } public function directDataPacket($id, $data){