function(error) {
        if (disconnectError) {return;}
        if (error) {
          var err = {code:'DISONNECT_ERROR', err: error};
          disconnectError = true;
          logger.error('onDisconnect', err);
          return callback(err);
        }
        for (var name1 in t.monitors) {
          if (t.monitors[name1].isConnected()) {
            return;
          }
        }
        t.set({started:false});
        t.compiledScript = null;
        callback();
      }
function(error) {
        if (disconnectError) {return;}
        if (error) {
          var err = {code:'DISONNECT_ERROR', err: error};
          disconnectError = true;
          logger.error('onDisconnect', err);
          return callback(err);
        }
        for (var name1 in t.monitors) {
          if (t.monitors[name1].isConnected()) {
            return;
          }
        }
        t.set({started:false});
        t.compiledScript = null;
        callback();
      }
function ( error ) { if ( disconnectError ) { return ; } if ( error ) { var err = { code : 'DISONNECT_ERROR' , err : error } ; disconnectError = true ; logger . error ( 'onDisconnect' , err ) ; return callback ( err ) ; } for ( var name1 in t . monitors ) { if ( t . monitors [ name1 ] . isConnected ( ) ) { return ; } } t . set ( { started : false } ) ; t . compiledScript = null ; callback ( ) ; }
Called when a monitor has disconnected
Called when a monitor has disconnected