Skip to content

Commit d2ab02b

Browse files
committed
remove outdated connectivity loss filter
1 parent 03cb72f commit d2ab02b

File tree

2 files changed

+1
-12
lines changed

2 files changed

+1
-12
lines changed

src/shared/modules/connections/connectionsDuck.ts

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -353,14 +353,6 @@ export const onLostConnection = (dispatch: any) => (e: any) => {
353353
dispatch({ type: LOST_CONNECTION, error: e })
354354
}
355355

356-
export const connectionLossFilter = (action: any) => {
357-
const notLostCodes = [
358-
'Neo.ClientError.Security.Unauthorized',
359-
'Neo.ClientError.Security.AuthenticationRateLimit'
360-
]
361-
return notLostCodes.indexOf(action.error.code) < 0
362-
}
363-
364356
export const setRetainCredentials = (shouldRetain: any) => {
365357
return {
366358
type: UPDATE_RETAIN_CREDENTIALS,
@@ -681,13 +673,12 @@ export const disconnectSuccessEpic = (action$: any, store: any) => {
681673
export const connectionLostEpic = (action$: any, store: any) =>
682674
action$
683675
.ofType(LOST_CONNECTION)
684-
.filter(connectionLossFilter)
685676
// Only retry in web env and if we're supposed to be connected
686677
.filter(() => inWebEnv(store.getState()) && isConnected(store.getState()))
687678
.throttleTime(5000)
688679
.do(() => store.dispatch(updateConnectionState(PENDING_STATE)))
689680
.mergeMap((action: any) => {
690-
authLog('Detected loss of connectitivity, attempting to recover.')
681+
authLog('Detected loss of connectitivity, attempting to recover')
691682
return (
692683
Rx.Observable.of(1)
693684
.mergeMap(() => {

src/shared/modules/dbMeta/dbMetaEpics.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ import {
7474
LOST_CONNECTION,
7575
SILENT_DISCONNECT,
7676
UPDATE_CONNECTION_STATE,
77-
connectionLossFilter,
7877
getActiveConnectionData,
7978
getLastUseDb,
8079
getUseDb,
@@ -423,7 +422,6 @@ export const dbMetaEpic = (some$: any, store: any) =>
423422
.takeUntil(
424423
some$
425424
.ofType(LOST_CONNECTION)
426-
.filter(connectionLossFilter)
427425
.merge(some$.ofType(DISCONNECTION_SUCCESS))
428426
.merge(some$.ofType(SILENT_DISCONNECT))
429427
)

0 commit comments

Comments
 (0)