]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/Irc/extlib/phergie/Phergie/Process/Async.php
Merge branch 'master' into social-master
[quix0rs-gnu-social.git] / plugins / Irc / extlib / phergie / Phergie / Process / Async.php
index 4946152bb30c37ae0cb33b1d4446519e5be7ba01..78d5959144cf976e04a77f0024b52b4ee1d59664 100644 (file)
@@ -37,14 +37,14 @@ class Phergie_Process_Async extends Phergie_Process_Abstract
      *
      * @var int
      */
-    protected $sec;
+    protected $sec = 0;
 
     /**
      * Length of time to poll for stream activity (microseconds)
      *
      * @var int
      */
-    protected $usec;
+    protected $usec = 200000;
 
     /**
      * Length of time to wait between ticks.
@@ -87,7 +87,7 @@ class Phergie_Process_Async extends Phergie_Process_Abstract
             }
         }
 
-        if (isset($this->sec) && isset($this->usec)) {
+        if (!isset($this->sec) && !isset($this->usec)) {
             throw new Phergie_Process_Exception(
                 'One of the processor options "sec" or "usec" must be specified'
             );
@@ -117,11 +117,7 @@ class Phergie_Process_Async extends Phergie_Process_Abstract
             if ($event = $this->driver->getEvent()) {
                 $this->ui->onEvent($event, $connection);
                 $this->plugins->setEvent($event);
-
-                if (!$this->plugins->preEvent()) {
-                    continue;
-                }
-
+                $this->plugins->preEvent();
                 $this->plugins->{'on' . ucfirst($event->getType())}();
             }