Browse Source

check message type before yielding message data

pull/64/head
Eric Seidler 8 years ago
parent
commit
09d8d5d0d4
  1. 1
      socketio/zmq_manager.py

1
socketio/zmq_manager.py

@ -104,6 +104,7 @@ class ZmqManager(PubSubManager): # pragma: no cover
if isinstance(message, str):
message = pickle.loads(message)
if isinstance(message, dict) and \
message['type'] == 'message' and \
message['channel'] == self.channel and \
'data' in message:
yield message['data']

Loading…
Cancel
Save