From faca03ba9458e12ec41b85100d8de03ad64f3e03 Mon Sep 17 00:00:00 2001 From: Wiktor Sieprawski Date: Wed, 29 Nov 2023 15:57:28 +0100 Subject: [PATCH] fix: check websocket client connection status before blocking the flow #1970 (#2125) --- .../src/store/navigation/redirection/redirection.saga.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/mobile/src/store/navigation/redirection/redirection.saga.ts b/packages/mobile/src/store/navigation/redirection/redirection.saga.ts index 3c540fcede..798ab18390 100644 --- a/packages/mobile/src/store/navigation/redirection/redirection.saga.ts +++ b/packages/mobile/src/store/navigation/redirection/redirection.saga.ts @@ -44,7 +44,10 @@ export function* redirectionSaga(): Generator { // If user doesn't belong to a community, wait for websocket connection and redirect to welcome screen console.log('INIT_NAVIGATION: Waiting for websocket connection before proceeding.') - yield* take(initActions.setWebsocketConnected) + const connection = yield* select(initSelectors.isWebsocketConnected) + if (!connection) { + yield* take(initActions.setWebsocketConnected) + } console.log('INIT_NAVIGATION: Switching to the join community screen.') yield* put(