From 598568c7152dc970dc740de040697e97cf374ec1 Mon Sep 17 00:00:00 2001 From: rettier Date: Mon, 29 Jan 2018 18:43:47 +0100 Subject: [PATCH] assigning local ret variable to none if the asyncio task is canceled (#164) --- socketio/asyncio_namespace.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/socketio/asyncio_namespace.py b/socketio/asyncio_namespace.py index ba22e4e..893c5e0 100644 --- a/socketio/asyncio_namespace.py +++ b/socketio/asyncio_namespace.py @@ -36,7 +36,7 @@ class AsyncNamespace(namespace.Namespace): try: ret = await handler(*args) except asyncio.CancelledError: # pragma: no cover - pass + ret = None else: ret = handler(*args) return ret