diff --git a/lib/Connection.js b/lib/Connection.js index 537f6be..084ae7c 100644 --- a/lib/Connection.js +++ b/lib/Connection.js @@ -1115,7 +1115,7 @@ Connection.prototype._resUntagged = function(info) { if (toget.length === 0) { process.nextTick(function() { - msg.ended = true; + if (msg) msg.ended = true; msgEmitter.emit('attributes', attrs); msgEmitter.emit('end'); });