Skip to content

Commit

Permalink
fixed #1
Browse files Browse the repository at this point in the history
  • Loading branch information
chaz6chez committed Sep 5, 2022
1 parent f3dce48 commit 7b4ad2d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function sync_publish(FastBuilder $builder, string $body, ?array $headers = null
{
$message = $builder->getMessage();
if(
($message->getExchangeType() !== Constants::DELAYED and $headers['x-delay'] ?? 1) or
($message->getExchangeType() !== Constants::DELAYED and $headers['x-delay'] ?? 0) or
($message->getExchangeType() === Constants::DELAYED and !($headers['x-delay'] ?? 0))
){
throw new WebmanRabbitMQException('Invalid publish. ');
Expand All @@ -42,7 +42,7 @@ function async_publish(FastBuilder $builder, string $body, ?array $headers = nul
{
$message = $builder->getMessage();
if(
($message->getExchangeType() !== Constants::DELAYED and $headers['x-delay'] ?? 1) or
($message->getExchangeType() !== Constants::DELAYED and $headers['x-delay'] ?? 0) or
($message->getExchangeType() === Constants::DELAYED and !($headers['x-delay'] ?? 0))
){
throw new WebmanRabbitMQException('Invalid publish. ');
Expand Down

0 comments on commit 7b4ad2d

Please sign in to comment.