Skip to content

Commit

Permalink
Fix: Missing argument for handler in send
Browse files Browse the repository at this point in the history
The unbound methods are stored in the class method
_event_handlers, which means we have to provide
the self argument.
  • Loading branch information
Johan B.W. de Vries authored and Johan B.W. de Vries committed Jan 17, 2023
1 parent e5139e2 commit f539a94
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion granian/asgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit f539a94

Please sign in to comment.