Skip to content

Commit

Permalink
BUGFIX: Do not return message if timeout occured
Browse files Browse the repository at this point in the history
  • Loading branch information
hlubek authored Oct 5, 2018
1 parent 664fc64 commit 11db963
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Classes/Queue/RedisQueue.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@ public function waitAndReserve(?int $timeout = null): ?Message
}
$this->checkClientConnection();
$messageId = $this->client->brpoplpush("queue:{$this->name}:messages", "queue:{$this->name}:processing", $timeout);
if ($messageId === false) {
return null;
}
return $this->getMessageById($messageId);
}

Expand Down

0 comments on commit 11db963

Please sign in to comment.