We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d5e26ba commit a83ede2Copy full SHA for a83ede2
1 file changed
src/Protocols/Amqp.php
@@ -272,16 +272,21 @@ protected function connect(): bool
272
273
[$host, $port] = explode(':', $host);
274
275
+ $heartbeat = $this->settings['heartbeat'] ?? null;
276
+
277
$credentials = [
278
'host' => $host,
279
'port' => $port,
280
'vhost' => $this->settings['vhost'],
281
'login' => $this->login,
282
'password' => $this->password,
283
'connect_timeout' => $this->settings['connect_timeout'] ?? 0,
- 'heartbeat' => $this->settings['heartbeat'] ?? 0,
284
];
285
286
+ if ($heartbeat !== null) {
287
+ $credentials['heartbeat'] = $heartbeat;
288
+ }
289
290
$link = new AMQPConnection($credentials);
291
292
try {
0 commit comments