Retry websocket connect if error returned is 502
* Retry websocket connect if error returned is 502 * Introduce connect button on 'Disconnected' left-pane dialog * NetworkStatus: If user clicks connect, show connecting for 5s
This commit is contained in:
parent
c44176f7f3
commit
6bd5587d50
5 changed files with 89 additions and 15 deletions
|
@ -1,3 +1,6 @@
|
|||
import { trigger } from '../../shims/events';
|
||||
|
||||
import { NoopActionType } from './noop';
|
||||
import { LocalizerType } from '../../types/Util';
|
||||
|
||||
// State
|
||||
|
@ -34,6 +37,7 @@ export type UserActionType = UserChangedActionType;
|
|||
|
||||
export const actions = {
|
||||
userChanged,
|
||||
manualReconnect,
|
||||
};
|
||||
|
||||
function userChanged(attributes: {
|
||||
|
@ -49,6 +53,15 @@ function userChanged(attributes: {
|
|||
};
|
||||
}
|
||||
|
||||
function manualReconnect(): NoopActionType {
|
||||
trigger('manualConnect');
|
||||
|
||||
return {
|
||||
type: 'NOOP',
|
||||
payload: null,
|
||||
};
|
||||
}
|
||||
|
||||
// Reducer
|
||||
|
||||
function getEmptyState(): UserStateType {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue