From 2a4d2a92ab9db7619fd9712016d3bdbc4803afd7 Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Pueyo Date: Sat, 27 Apr 2013 00:49:59 +0200 Subject: [PATCH] Fix :DD (remove temp. feature) --- src/API/ConsoleAPI.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/API/ConsoleAPI.php b/src/API/ConsoleAPI.php index 5bdcc5ca5..4f259e974 100644 --- a/src/API/ConsoleAPI.php +++ b/src/API/ConsoleAPI.php @@ -267,7 +267,7 @@ class ConsoleLoop extends Thread{ public function run(){ $fp = fopen("php://stdin", "r"); - if(HAS_EVENT){ + if(HAS_EVENT and false){ $this->base = new EventBase(); $this->ev = new Event($this->base, $fp, Event::READ | Event::PERSIST, array($this, "readLine")); $this->ev->add(); @@ -279,8 +279,10 @@ class ConsoleLoop extends Thread{ } } }else{ - while($this->stop === false){ - $this->readLine($fp); + while($this->stop === false and ($line = fgets($fp)) !== false){ + $this->line = $line; + $this->wait(); + $this->line = false; } } @fclose($fp);