]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
better check for ready state on connection
authorEvan Prodromou <evan@prodromou.name>
Sat, 30 Aug 2008 17:14:41 +0000 (13:14 -0400)
committerEvan Prodromou <evan@prodromou.name>
Sat, 30 Aug 2008 17:14:41 +0000 (13:14 -0400)
darcs-hash:20080830171441-84dde-bb5373c4af2ae223d7b4b150f5a76404247a7570.gz

extlib/XMPPHP/XMLStream.php

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