From 4285211a7377d9b6b98a670b7eecaac4a77bfefa Mon Sep 17 00:00:00 2001 From: mscdex Date: Sun, 21 Jul 2013 21:38:27 -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 62ee8c4..c6de769 100644 --- a/lib/Connection.js +++ b/lib/Connection.js @@ -1562,7 +1562,7 @@ Connection.prototype._enqueue = function(fullcmd, promote, cb) { // defer until next tick for requests like APPEND and FETCH where access to // the request object is needed immediately after enqueueing process.nextTick(function() { self._processQueue(); }); - } else if (this._curReq.type === 'IDLE') { + } else if (this._curReq && this._curReq.type === 'IDLE') { this._idle.enabled = false; this.debug && this.debug('=> DONE'); this._sock.write('DONE' + CRLF);