fix(connection): reload immediately on possible split-brain (#3162)

* fix(connection): reload immediately on possible split-brain

There isn't an explicit way to know when a split brain
scenario has happened. It is assumed it arises when an
"item-not-found" connection error is encountered early
on in the conference. So, store when a connection has
happened so it be calculated how much time has
elapsed and if the threshold has not been exceeded
then do an immediate reload of the app instead of
showing the overlay with a reload timer.

* squash: rename isItemNotFoundError -> isShardChangedError
This commit is contained in:
virtuacoplenny
2018-07-02 14:22:51 -07:00
committed by Дамян Минков
parent 1c6d22b75e
commit 84b589719f
12 changed files with 136 additions and 49 deletions

View File

@@ -4,10 +4,9 @@ import PropTypes from 'prop-types';
import React, { Component } from 'react';
import { connect } from 'react-redux';
import { reloadNow } from '../../app';
import { translate } from '../../base/i18n';
import { _reloadNow } from '../actions';
/**
* Implements a React Component for button for the overlays that will reload
* the page.
@@ -82,7 +81,7 @@ function _mapDispatchToProps(dispatch: Function): Object {
* @returns {Object} Dispatched action.
*/
_reloadNow() {
dispatch(_reloadNow());
dispatch(reloadNow());
}
};
}