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