From 20c1339acd88e1017beb1e05dd635aed57a3b6f2 Mon Sep 17 00:00:00 2001 From: Sam Mosleh Date: Sun, 3 Jan 2021 12:28:12 +0330 Subject: [PATCH] Reraise CancelledError in _execute --- aredis/pubsub.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aredis/pubsub.py b/aredis/pubsub.py index 7dbb9627..d0ce66e1 100644 --- a/aredis/pubsub.py +++ b/aredis/pubsub.py @@ -115,7 +115,7 @@ async def _execute(self, connection, command, *args): # disconnect if buffer is not empty in case of error # when connection is reused connection.disconnect() - return None + raise except (ConnectionError, TimeoutError) as e: connection.disconnect() if not connection.retry_on_timeout and isinstance(e, TimeoutError):