Connection: add guard for conditional

fork
mscdex 11 years ago
parent dff2ff4a90
commit 4285211a73

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

Loading…
Cancel
Save