From 5c538d39a09f9fbf7d8f1cc8a5378d969ed7538e Mon Sep 17 00:00:00 2001 From: Maksim Kotlyar Date: Thu, 30 Nov 2017 17:52:33 +0200 Subject: [PATCH] [amqp-bunny] In case of zero timeout we should pass null to bunny lib. --- pkg/amqp-bunny/AmqpContext.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/amqp-bunny/AmqpContext.php b/pkg/amqp-bunny/AmqpContext.php index 09c810bca..a519227ca 100644 --- a/pkg/amqp-bunny/AmqpContext.php +++ b/pkg/amqp-bunny/AmqpContext.php @@ -388,7 +388,7 @@ public function consume($timeout = 0) throw new \LogicException('There is no subscribers. Consider calling basicConsumeSubscribe before consuming'); } - $this->getBunnyChannel()->getClient()->run($timeout / 1000); + $this->getBunnyChannel()->getClient()->run(0 !== $timeout ? $timeout / 1000 : null); } /**