Misc UI Updates

This commit is contained in:
Qstick 2017-10-28 16:13:32 -04:00
parent 1b64171b30
commit cb9af37c39
6 changed files with 65 additions and 6 deletions

View file

@ -90,6 +90,12 @@ class SignalRConnector extends Component {
// Control
retryConnection = () => {
if (this.retryInterval >= 30) {
this.setState({
isDisconnected: true
});
}
this.retryTimeoutId = setTimeout(() => {
this.signalRconnection.start(this.signalRconnectionOptions);
this.retryInterval = Math.min(this.retryInterval + 5, 30);
@ -328,8 +334,9 @@ class SignalRConnector extends Component {
this.props.setAppValue({
isConnected: false,
isReconnecting: true,
isDisconnected: true
isReconnecting: true
// Don't set isDisconnected yet, it'll be set it if it's disconnected
// for ~105 seconds (retry interval reaches 30 seconds)
});
this.retryConnection();