lib/state.js
function pause(timeout) {
  var log = this._logger;
  // keep list of matching clients
  var clients = [];
  this._conn.forEach(function(conn) {
    if(!conn.client.isSlave()) {
      clients.push(conn);
      conn.pause();
    }
  })
  function resume() {
    log.notice('resume %s connections', clients.length);
    clients.forEach(function(conn) {
      conn.resume();
    })
  }
  log.notice('pause %s connections for %sms', clients.length, timeout);
  setTimeout(resume, timeout);
}
function pause(timeout) {
  var log = this._logger;
  // keep list of matching clients
  var clients = [];
  this._conn.forEach(function(conn) {
    if(!conn.client.isSlave()) {
      clients.push(conn);
      conn.pause();
    }
  })
  function resume() {
    log.notice('resume %s connections', clients.length);
    clients.forEach(function(conn) {
      conn.resume();
    })
  }
  log.notice('pause %s connections for %sms', clients.length, timeout);
  setTimeout(resume, timeout);
}
function pause ( timeout ) { var log = this . _logger ; // keep list of matching clients var clients = [ ] ; this . _conn . forEach ( function ( conn ) { if ( ! conn . client . isSlave ( ) ) { clients . push ( conn ) ; conn . pause ( ) ; } } ) function resume ( ) { log . notice ( 'resume %s connections' , clients . length ) ; clients . forEach ( function ( conn ) { conn . resume ( ) ; } ) } log . notice ( 'pause %s connections for %sms' , clients . length , timeout ) ; setTimeout ( resume , timeout ) ; }
Pause normal and pubsub clients.
Pause normal and pubsub clients .