From 62ca723039523ad2c1409de10293ed8db8aaabe4 Mon Sep 17 00:00:00 2001 From: Matthias Urlichs Date: Wed, 18 Jan 2023 19:33:19 +0100 Subject: [PATCH] * error handling --- async_amqp/channel.py | 4 ++-- debian/changelog | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/async_amqp/channel.py b/async_amqp/channel.py index 9688855..50f8618 100644 --- a/async_amqp/channel.py +++ b/async_amqp/channel.py @@ -18,7 +18,7 @@ from . import properties as amqp_properties from .envelope import Envelope, ReturnEnvelope from .future import Future -from .exceptions import AmqpClosedConnection, SynchronizationError +from .exceptions import AmqpClosedConnection, ChannelClosed, SynchronizationError logger = logging.getLogger(__name__) @@ -64,7 +64,7 @@ async def __aexit__(self, *tb): with anyio.CancelScope(shield=True): try: await self.channel.basic_cancel(self.consumer_tag) - except AmqpClosedConnection: + except (AmqpClosedConnection,ChannelClosed): pass await self._q_w.aclose() await self._q_r.aclose() diff --git a/debian/changelog b/debian/changelog index efe0ec1..1eaf11e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +async-amqp (0.2.14-1) unstable; urgency=medium + + * error handling + + -- Matthias Urlichs Wed, 18 Jan 2023 19:33:39 +0100 + async-amqp (0.2.13-1) unstable; urgency=medium * Buffer incoming data