Fix fetch crash when all parts come back immediately

Resolves "TypeError: Cannot set property 'ended' of undefined" if
bodies are sent immediately and no msg is added to the fetchCache.
fork
Ross Johnson 11 years ago
parent d932d3db56
commit 96af8f4a8e

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

Loading…
Cancel
Save