From f539a94402a5d6469d4901019d115c0289063157 Mon Sep 17 00:00:00 2001 From: "Johan B.W. de Vries" Date: Tue, 17 Jan 2023 17:02:29 +0100 Subject: [PATCH] Fix: Missing argument for handler in send The unbound methods are stored in the class method _event_handlers, which means we have to provide the self argument. --- granian/asgi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/granian/asgi.py b/granian/asgi.py index 617c13bc..137461ef 100644 --- a/granian/asgi.py +++ b/granian/asgi.py @@ -98,7 +98,7 @@ def _handle_shutdown_failed(self, message): async def send(self, message): handler = self._event_handlers[message["type"]] - handler(message) + handler(self, message) def _noop_wrapper(proto):