|
|
|
@ -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;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
self._curReq = undefined;
|
|
|
|
|
|
|
|
|
@ -209,6 +207,9 @@ Connection.prototype.connect = function() {
|
|
|
|
|
&& self.state === 'authenticated'
|
|
|
|
|
&& !self._idle.enabled) {
|
|
|
|
|
self._idle.enabled = true;
|
|
|
|
|
if (m[1] === 'NOOP')
|
|
|
|
|
self._doKeepaliveTimer();
|
|
|
|
|
else
|
|
|
|
|
self._doKeepaliveTimer(true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|