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:
@@ -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 {
|
||||
|
Reference in New Issue
Block a user