Skip to content

Commit

Permalink
fix: the logic for getting the handler
Browse files Browse the repository at this point in the history
  • Loading branch information
Champgy committed Mar 24, 2024
1 parent fff4640 commit b0afcc8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/socketio/base_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ def _get_event_handler(self, event, namespace, args):
'*' in self.handlers[namespace]:
handler = self.handlers[namespace]['*']
args = (event, *args)
elif '*' in self.handlers:
if handler is None and '*' in self.handlers:
if event in self.handlers['*']:
handler = self.handlers['*'][event]
args = (namespace, *args)
Expand All @@ -245,7 +245,7 @@ def _get_namespace_handler(self, namespace, args):
handler = None
if namespace in self.namespace_handlers:
handler = self.namespace_handlers[namespace]
elif '*' in self.namespace_handlers:
if handler is None and '*' in self.namespace_handlers:
handler = self.namespace_handlers['*']
args = (namespace, *args)
return handler, args
Expand Down

0 comments on commit b0afcc8

Please sign in to comment.