src/components/InstancePicker.js
/*
   * Callback for when the RPC call returns the instances.
   */
Callback for when the RPC call returns the instances.
Callback for when the RPC call returns the instances .
onInstancesReceived(err, result) {
    if (this.timeoutId !== undefined) {
      clearTimeout(this.timeoutId);
      this.timeoutId = undefined;
    }
    if (!err) {
      this.instances = result;
      this.setState({ instances: result });
      this.pingLoop = setInterval(this.pingAllInstances, 1000);
      this.postLoadState = STATE_OK;
      if (this.loadedMinTime) {
        this.setState({ state: STATE_OK });
      }
    } else {
      if (err === deepstream.CONSTANTS.EVENT.NO_RPC_PROVIDER) {
        this.error = 'Service is not responding';
      } else {
        this.error = err;
      }
      this.postLoadState = STATE_ERROR;
      if (this.loadedMinTime) {
        this.setState({ state: STATE_ERROR });
      }
    }
  }
onInstancesReceived ( err , result ) { if ( this . timeoutId !== undefined ) { clearTimeout ( this . timeoutId ) ; this . timeoutId = undefined ; } if ( ! err ) { this . instances = result ; this . setState ( { instances : result } ) ; this . pingLoop = setInterval ( this . pingAllInstances , 1000 ) ; this . postLoadState = STATE_OK ; if ( this . loadedMinTime ) { this . setState ( { state : STATE_OK } ) ; } } else { if ( err === deepstream . CONSTANTS . EVENT . NO_RPC_PROVIDER ) { this . error = 'Service is not responding' ; } else { this . error = err ; } this . postLoadState = STATE_ERROR ; if ( this . loadedMinTime ) { this . setState ( { state : STATE_ERROR } ) ; } } }
Callback for when the RPC call returns the instances.
Callback for when the RPC call returns the instances .