From d6b3a9175160104ba3a42635df744d4dc2cb5b48 Mon Sep 17 00:00:00 2001 From: Robin Lambertz Date: Tue, 29 Jan 2013 11:05:10 +0000 Subject: [PATCH] client.end should have a string argument, not an Error object. --- lib/client.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/client.js b/lib/client.js index bbf7211..26c3396 100644 --- a/lib/client.js +++ b/lib/client.js @@ -29,7 +29,7 @@ Client.prototype.setSocket = function(socket) { while (true) { parsed = parsePacket(incomingBuffer, self.isServer); if (! parsed) break; - if (parsed.error) this.end(parsed.error); + if (parsed.error) this.end(parsed.error.message); packet = parsed.results; incomingBuffer = incomingBuffer.slice(parsed.size); self.emit(packet.id, packet);