From beeae35291311e00346c6ccf8f225acdb9873726 Mon Sep 17 00:00:00 2001 From: Brian Carlson Date: Sat, 17 Aug 2013 17:33:27 -0500 Subject: [PATCH] Fix js-hint error --- lib/connection.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/connection.js b/lib/connection.js index 8f31dcc5..c83ee964 100644 --- a/lib/connection.js +++ b/lib/connection.js @@ -89,12 +89,13 @@ Connection.prototype.connect = function(port, host) { Connection.prototype.attachListeners = function(stream) { stream.on('data', function(buff) { this.setBuffer(buff); - var msg; - while(msg = this.parseMessage()) { + var msg = this.parseMessage(); + while(msg) { if(this._emitMessage) { this.emit('message', msg); } this.emit(msg.name, msg); + msg = this.parseMessage(); } }.bind(this)); };