Skip to content

Commit

Permalink
prevent crash when client sends empty event
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelgrinberg committed Sep 2, 2024
1 parent 9aea705 commit 03512f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/flask_socketio/namespace.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def trigger_event(self, event, *args):
method can be overridden if special dispatching rules are needed, or if
having a single method that catches all events is desired.
"""
handler_name = 'on_' + event
handler_name = 'on_' + (event or '')
if not hasattr(self, handler_name):
# there is no handler for this event, so we ignore it
return
Expand Down

0 comments on commit 03512f2

Please sign in to comment.