Skip to content

Commit

Permalink
Used the run method to call the flush method provided in th bunny client
Browse files Browse the repository at this point in the history
  • Loading branch information
sebprt committed Nov 17, 2023
1 parent 3e16e14 commit e377458
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Rejection.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ public static function withAuthentication(

public function reject(object|array $rejection, ?\Throwable $exception = null): void
{
$this->channel->publish(
$this->connection->publish(
$this->channel->getChannelId(),
json_encode([
'item' => $rejection,
'exception' => $exception,
Expand All @@ -84,6 +85,8 @@ public function reject(object|array $rejection, ?\Throwable $exception = null):
$this->exchange,
$this->topic,
);

$this->connection->run(0);
}

public function initialize(): void
Expand Down

0 comments on commit e377458

Please sign in to comment.