Skip to content

Commit 03512f2

Browse files
prevent crash when client sends empty event
1 parent 9aea705 commit 03512f2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/flask_socketio/namespace.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def trigger_event(self, event, *args):
1717
method can be overridden if special dispatching rules are needed, or if
1818
having a single method that catches all events is desired.
1919
"""
20-
handler_name = 'on_' + event
20+
handler_name = 'on_' + (event or '')
2121
if not hasattr(self, handler_name):
2222
# there is no handler for this event, so we ignore it
2323
return

0 commit comments

Comments
 (0)