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');