Browse Source

handle failed pickled.loads

pull/64/head
Eric Seidler 8 years ago
parent
commit
42ad98e750
  1. 5
      socketio/zmq_manager.py

5
socketio/zmq_manager.py

@ -102,7 +102,10 @@ class ZmqManager(PubSubManager): # pragma: no cover
def _listen(self): def _listen(self):
for message in self.zmq_listen(): for message in self.zmq_listen():
if isinstance(message, str): if isinstance(message, str):
message = pickle.loads(message) try:
message = pickle.loads(message)
except Exception:
pass
if isinstance(message, dict) and \ if isinstance(message, dict) and \
message['type'] == 'message' and \ message['type'] == 'message' and \
message['channel'] == self.channel and \ message['channel'] == self.channel and \

Loading…
Cancel
Save