Commit 602aa4e2 by ken

depth

parent 6af884c4
......@@ -99,9 +99,7 @@ const _subscribe = function(callback, opened_callback = false) {
ws.on('close', _handleSocketClose.bind(ws));
ws.on('message', function(data) {
try {
const text = pako.inflate(data, {
to: 'string'
});
const text = pako.inflate(data);
console.log(text);
callback(JSON.parse(text));
} catch (error) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment