Connection: for NOOP, make sure to re-NOOP when still idle

fork
Brian White 11 years ago
parent 89aef1b73d
commit 6084484218

@ -196,11 +196,9 @@ Connection.prototype.connect = function() {
parser.on('other', function(line) {
var m;
if (m = RE_IDLENOOPRES.exec(line)) {
if (m[1] === 'IDLE') {
// no longer idling
self._idle.enabled = false;
self._idle.started = undefined;
}
// no longer idling
self._idle.enabled = false;
self._idle.started = undefined;
self._curReq = undefined;
@ -209,7 +207,10 @@ Connection.prototype.connect = function() {
&& self.state === 'authenticated'
&& !self._idle.enabled) {
self._idle.enabled = true;
self._doKeepaliveTimer(true);
if (m[1] === 'NOOP')
self._doKeepaliveTimer();
else
self._doKeepaliveTimer(true);
}
self._processQueue();

Loading…
Cancel
Save