diff --git a/src/Connection/Connection.php b/src/Connection/Connection.php index 9f4610a..47086d8 100644 --- a/src/Connection/Connection.php +++ b/src/Connection/Connection.php @@ -80,7 +80,11 @@ public function getChannel(): Channel $this->channel = $channel; } catch (ClientException $e) { - if ($e->getMessage() !== 'Broken pipe or closed connection.') { + if (!in_array( + $e->getMessage(), + ['Broken pipe or closed connection.', 'Could not write data to socket.'], + true + )) { throw new ConnectionException($e->getMessage(), $e->getCode(), $e); }