Skip to content

Commit 620031c

Browse files
committed
[amqp-bunny] ignore broken pipe exception in __destruct()
1 parent 573ba54 commit 620031c

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

pkg/amqp-bunny/BunnyClient.php

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,12 @@ class BunnyClient extends Client
99
{
1010
public function __destruct()
1111
{
12-
// try {
13-
parent::__destruct();
14-
// } catch (ClientException $e) {
15-
// if ('' === $e->getMessage()
16-
// }
12+
try {
13+
parent::__destruct();
14+
} catch (ClientException $e) {
15+
if ('Broken pipe or closed connection.' !== $e->getMessage()) {
16+
throw $e;
17+
}
18+
}
1719
}
1820
}

0 commit comments

Comments
 (0)