better check for ready state on connection

darcs-hash:20080830171441-84dde-bb5373c4af2ae223d7b4b150f5a76404247a7570.gz
This commit is contained in:
Evan Prodromou 2008-08-30 13:14:41 -04:00
parent 0217a74f13
commit e4d42b2355

View File

@ -619,9 +619,9 @@ class XMPPHP_XMLStream {
public function readyToProcess() { public function readyToProcess() {
$read = array($this->socket); $read = array($this->socket);
$write = null; $write = array();
$except = null; $except = array();
$updated = @stream_select($read, $write, $except, 0); $updated = @stream_select($read, $write, $except, 0);
return $updated !== false; return (($updated !== false) && ($updated > 0));
} }
} }