Skip to content
Browse files

fix timeout in processUntil() and docblock for __process

  • Loading branch information...
1 parent 28ab998 commit eefdf7d86d6c9e6d5a3ab91995fa96e03905e523 @cweiske committed
Showing with 2 additions and 2 deletions.
  1. +2 −2 XMPPHP/XMLStream.php
View
4 XMPPHP/XMLStream.php
@@ -416,7 +416,7 @@ protected function bufferComplete($buff)
* @param mixed $maximum Limit when to return
* - 0: only read if data is immediately ready
* - NULL: wait forever and ever
- * - integer: process for this amount of milliseconds
+ * - integer: process for this amount of microseconds
* @param boolean $return_when_received Immediately return when data have been
* received
*
@@ -536,7 +536,7 @@ public function processUntil($event, $timeout = -1)
) {
$maximum = $timeout == -1
? NULL
- : time() - $start;
+ : ($timeout - (time() - $start)) * 1000000;
$ret = $this->__process($maximum, true);
if (!$ret) {
break;

0 comments on commit eefdf7d

Please sign in to comment.
Something went wrong with that request. Please try again.