Open GoogleCodeExporter opened 9 years ago
You propose to unset $this->until_payload[$event_key] but array_key_exists()
just checked that it doesn't exist.
Actually you only need to unset $this->until and $this->until_count arrays.
However my solution is to comment the line:
$this->until_count[$event_key] = 0;
and to move
unset($this->until[$event_key]);
out of the condition block to the end of the function, right above the return
statement.
I think that's bit more correct.
code:
//$this->until_count[$event_key] = 0;
//$updated = '';
while(!$this->disconnected and $this->until_count[$event_key] < 1 and (time() - $start < $timeout or $timeout == -1)) {
$this->__process();
}
if(array_key_exists($event_key, $this->until_payload)) {
$payload = $this->until_payload[$event_key];
unset($this->until_payload[$event_key]);
unset($this->until_count[$event_key]);
} else {
$payload = array();
}
unset($this->until[$event_key]);
return $payload;
Original comment by tifss...@gmail.com
on 4 Aug 2012 at 11:49
Original issue reported on code.google.com by
avisovoc...@gmail.com
on 8 May 2010 at 6:36