From 2867d2ac966c3cbc8ed5f779d85de3fc51cf4ea1 Mon Sep 17 00:00:00 2001 From: Roger Garner Date: Mon, 1 Jul 2013 16:32:51 +0100 Subject: [PATCH] Ending IDLE not being detected As the buffer was wiped before emitting the 'other' event, the parser.on('other') event handler has no buffer data passed to it thus can't detect the end of the IDLE and never calls the self._processQueue() to get the stuff waiting in the queue to move. --- lib/Parser.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Parser.js b/lib/Parser.js index a98a1cf..3665655 100644 --- a/lib/Parser.js +++ b/lib/Parser.js @@ -128,8 +128,8 @@ Parser.prototype._parse = function(data) { } } } else { - this._buffer = ''; this.emit('other', this._buffer); + this._buffer = ''; } } }