Skip to content

Commit

Permalink
fix timeout in processUntil() and docblock for __process
Browse files Browse the repository at this point in the history
  • Loading branch information
cweiske authored and Drarok committed May 6, 2010
1 parent 427cab6 commit dd56f14
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions XMPPHP/XMLStream.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit dd56f14

Please sign in to comment.