diff --git a/lib/Connection.js b/lib/Connection.js index 86ee924..9c3872c 100644 --- a/lib/Connection.js +++ b/lib/Connection.js @@ -1545,7 +1545,7 @@ Connection.prototype._doKeepaliveTimer = function(immediate) { return; } } - self._doKeepaliveTimer(); + self._tmrKeepalive = setTimeout(timerfn, KEEPALIVE_INTERVAL); } } }; @@ -1689,11 +1689,10 @@ Connection.prototype._processQueue = function() { this.debug && this.debug('=> ' + inspect(out)); this._sock.write(out + CRLF, 'utf8'); - if (! this._curReq.literalAppendData) - return; - - // LITERAL+: we are appending a mesage, and not waiting for a reply - this._sockWriteAppendData(this._curReq.literalAppendData); + if (this._curReq.literalAppendData) { + // LITERAL+: we are appending a mesage, and not waiting for a reply + this._sockWriteAppendData(this._curReq.literalAppendData); + } }; Connection.prototype._sockWriteAppendData = function(appendData) @@ -1714,11 +1713,12 @@ Connection.prototype._enqueue = function(fullcmd, promote, cb) { } var info = { - type: fullcmd.match(RE_CMD)[1], - fullcmd: fullcmd, - cb: cb, - cbargs: [] - }, self = this; + type: fullcmd.match(RE_CMD)[1], + fullcmd: fullcmd, + cb: cb, + cbargs: [] + }, + self = this; if (promote) this._queue.unshift(info);