Events are working on a per-namespace basis now
This commit is contained in:
parent
57971b5f71
commit
07a5cc4c63
1 changed files with 5 additions and 3 deletions
|
|
@ -410,7 +410,6 @@ class SocketIO(object):
|
|||
code, packet_id, path, data, p = packet
|
||||
packet = p;
|
||||
|
||||
|
||||
# Accoding to the documentation
|
||||
# (https://github.com/automattic/socket.io-protocol#event),
|
||||
# the event name is the first entry in the message array, and
|
||||
|
|
@ -420,9 +419,12 @@ class SocketIO(object):
|
|||
|
||||
_log.debug("[event] %s (%s)" % (repr(event), repr(args)));
|
||||
|
||||
if packet_id:
|
||||
if packet.payload.id is not None:
|
||||
args.append(self._prepare_to_send_ack(path, packet_id))
|
||||
find_event_callback(event)(*args)
|
||||
try:
|
||||
self._namespace_by_path[packet.payload.path]._find_event_callback(event)(*args);
|
||||
except KeyError:
|
||||
_log.error("Could not handle event for unknown path: %s" % packet.payload.path);
|
||||
|
||||
def _on_ack(self, packet, find_event_callback):
|
||||
code, packet_id, path, data = packet
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue