Skip to content

Commit 72b339f

Browse files
authoredApr 9, 2019
Merge pull request #820 from nightlinus/master
Fix heartbeat configuration in bunny with 0 (off) value
2 parents 0e75101 + 298db0a commit 72b339f

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed
 

‎pkg/amqp-bunny/AmqpConnectionFactory.php

+1-4
Original file line numberDiff line numberDiff line change
@@ -87,17 +87,14 @@ private function establishConnection(): BunnyClient
8787
$bunnyConfig['password'] = $this->config->getPass();
8888
$bunnyConfig['read_write_timeout'] = min($this->config->getReadTimeout(), $this->config->getWriteTimeout());
8989
$bunnyConfig['timeout'] = $this->config->getConnectionTimeout();
90+
$bunnyConfig['heartbeat'] = $this->config->getHeartbeat();
9091

9192
// @see https://github.com/php-enqueue/enqueue-dev/issues/229
9293
// $bunnyConfig['persistent'] = $this->config->isPersisted();
9394
// if ($this->config->isPersisted()) {
9495
// $bunnyConfig['path'] = 'enqueue';//$this->config->getOption('path', $this->config->getOption('vhost'));
9596
// }
9697

97-
if ($this->config->getHeartbeat()) {
98-
$bunnyConfig['heartbeat'] = $this->config->getHeartbeat();
99-
}
100-
10198
if (null !== $this->config->getOption('tcp_nodelay')) {
10299
$bunnyConfig['tcp_nodelay'] = $this->config->getOption('tcp_nodelay');
103100
}

0 commit comments

Comments
 (0)
Please sign in to comment.