From 620031c410c0976da787c2f425f3e46d64f4979b Mon Sep 17 00:00:00 2001 From: Maksim Kotlyar Date: Sat, 14 Oct 2017 20:15:08 +0300 Subject: [PATCH] [amqp-bunny] ignore broken pipe exception in __destruct() --- pkg/amqp-bunny/BunnyClient.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/pkg/amqp-bunny/BunnyClient.php b/pkg/amqp-bunny/BunnyClient.php index fbaa0b396..8697b9de4 100644 --- a/pkg/amqp-bunny/BunnyClient.php +++ b/pkg/amqp-bunny/BunnyClient.php @@ -9,10 +9,12 @@ class BunnyClient extends Client { public function __destruct() { -// try { - parent::__destruct(); -// } catch (ClientException $e) { -// if ('' === $e->getMessage() -// } + try { + parent::__destruct(); + } catch (ClientException $e) { + if ('Broken pipe or closed connection.' !== $e->getMessage()) { + throw $e; + } + } } }