Skip to content

Commit 0a488ca

Browse files
authored
Revert "Fix heartbeat configuration in bunny with 0 (off) value"
1 parent 1486fe2 commit 0a488ca

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pkg/amqp-bunny/AmqpConnectionFactory.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -87,14 +87,17 @@ 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();
9190

9291
// @see https://github.com/php-enqueue/enqueue-dev/issues/229
9392
// $bunnyConfig['persistent'] = $this->config->isPersisted();
9493
// if ($this->config->isPersisted()) {
9594
// $bunnyConfig['path'] = 'enqueue';//$this->config->getOption('path', $this->config->getOption('vhost'));
9695
// }
9796

97+
if ($this->config->getHeartbeat()) {
98+
$bunnyConfig['heartbeat'] = $this->config->getHeartbeat();
99+
}
100+
98101
if (null !== $this->config->getOption('tcp_nodelay')) {
99102
$bunnyConfig['tcp_nodelay'] = $this->config->getOption('tcp_nodelay');
100103
}

0 commit comments

Comments
 (0)