From 5697fb601e666fe787ad1f40ed13e21ccb13e73b Mon Sep 17 00:00:00 2001 From: mscdex Date: Sat, 6 Jul 2013 19:06:55 -0400 Subject: [PATCH] Connection: add guard for conditional --- lib/Connection.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Connection.js b/lib/Connection.js index 9211dc9..700daab 100644 --- a/lib/Connection.js +++ b/lib/Connection.js @@ -1084,7 +1084,7 @@ Connection.prototype._resUntagged = function(info) { i = toget.length; if (i === 0) { - if (!msg.ended) { + if (msg && !msg.ended) { msg.ended = true; process.nextTick(function() { msgEmitter.emit('end');