diff --git a/src/Bunny/AbstractClient.php b/src/Bunny/AbstractClient.php index 9c4d1c0..e9122ba 100644 --- a/src/Bunny/AbstractClient.php +++ b/src/Bunny/AbstractClient.php @@ -130,6 +130,8 @@ public function __construct(array $options = []) if (!isset($options["heartbeat"])) { $options["heartbeat"] = 60.0; + } elseif ($options["heartbeat"] == 0) { + throw new InvalidArgumentException("Heartbeat can not be zero."); } elseif ($options["heartbeat"] >= 2**15) { throw new InvalidArgumentException("Heartbeat too high: the value is a signed int16."); }