Comparing version 0.6.5 to 0.6.6
@@ -42,6 +42,2 @@ /* eslint no-console: [0]*/ | ||
stream.on('output', function(out) { | ||
console.log(out); | ||
}); | ||
stream.on('metadata', function(meta) { | ||
@@ -48,0 +44,0 @@ console.log('metadata: ' + JSON.stringify(meta)); |
{ | ||
"name": "sonic-js", | ||
"version": "0.6.5", | ||
"version": "0.6.6", | ||
"description": "ws client library for the Sonic protocol", | ||
@@ -5,0 +5,0 @@ "main": "src/lib.js", |
@@ -75,2 +75,9 @@ 'use strict'; | ||
var msg = BrowserWebSocket ? JSON.parse(message.data) : JSON.parse(message.toString('utf-8')); | ||
function checkMsg() { | ||
if (msg.v) { | ||
done(new Error('Query with trace_id `' + msg.p.trace_id + '` failed: ' + msg.v)); | ||
} else { | ||
done(null); | ||
} | ||
} | ||
@@ -83,9 +90,2 @@ switch (msg.e) { | ||
case 'D': | ||
function checkMsg() { | ||
if (msg.v) { | ||
done(new Error('Query with trace_id `' + msg.p.trace_id + '` failed: ' + msg.v)); | ||
} else { | ||
done(null); | ||
} | ||
} | ||
isDone = true; | ||
@@ -92,0 +92,0 @@ if (BrowserWebSocket) { |
40383
582