_reauthenticate() {
		this._logger.log('Reauthenticating...');
		this.cleanup();

		this.login().then(() => {
			this.listenToEventStream.apply(this, this._lastListenArguments);
		}, () => {
			const retryIn = 5;
			this._logger.error(`Failed to reauthenticate. Trying again in ${retryIn} seconds`);
			setTimeout(this._reauthenticate.bind(this), retryIn * 1000);
		});
	}
/**
	 * Callback that fetches a new token and recreates all
	 * event callbacks to prevent data loss.
	 *
	 * @private
	 */
Callback that fetches a new token and recreates all
event callbacks to prevent data loss.

@private
Callback that fetches a new token and recreates all event callbacks to prevent data loss . @private
_reauthenticate() {
		this._logger.log('Reauthenticating...');
		this.cleanup();
		this.login().then(() => {
			this.listenToEventStream.apply(this, this._lastListenArguments);
		}, () => {
			const retryIn = 5;
			this._logger.error(`Failed to reauthenticate. Trying again in ${retryIn} seconds`);
			setTimeout(this._reauthenticate.bind(this), retryIn * 1000);
		});
	}
_reauthenticate ( ) { this . _logger . log ( 'Reauthenticating...' ) ; this . cleanup ( ) ; this . login ( ) . then ( ( ) => { this . listenToEventStream . apply ( this , this . _lastListenArguments ) ; } , ( ) => { const retryIn = 5 ; this . _logger . error ( ` ${ retryIn } ` ) ; setTimeout ( this . _reauthenticate . bind ( this ) , retryIn * 1000 ) ; } ) ; }
Callback that fetches a new token and recreates all
 event callbacks to prevent data loss.
Callback that fetches a new token and recreates all event callbacks to prevent data loss .