Browse Source

Update packet.py

Disable emission of invalid JSON values, so it'll deserialize properly
pull/14/head
Connor Wolf 9 years ago
parent
commit
a33319a62e
  1. 2
      socketio/packet.py

2
socketio/packet.py

@ -57,7 +57,7 @@ class Packet(object):
if data is not None:
if needs_comma:
encoded_packet += ','
encoded_packet += self.json.dumps(data, separators=(',', ':'))
encoded_packet += self.json.dumps(data, separators=(',', ':'), allow_nan=False)
if attachments is not None:
encoded_packet = [encoded_packet] + attachments
return encoded_packet

Loading…
Cancel
Save