Merge pull request #677 from isra17/json_error

Use `ensure_ascii` in wep.app#broadcast
This commit is contained in:
Maximilian Hils 2015-07-14 00:53:32 +02:00
commit 822bd10465

View File

@ -81,7 +81,8 @@ class WebSocketEventBroadcaster(tornado.websocket.WebSocketHandler):
@classmethod @classmethod
def broadcast(cls, **kwargs): def broadcast(cls, **kwargs):
message = json.dumps(kwargs) message = json.dumps(kwargs, ensure_ascii=False)
for conn in cls.connections: for conn in cls.connections:
try: try:
conn.write_message(message) conn.write_message(message)