diff --git a/lib/components/keyserver-connection-handler.js b/lib/components/keyserver-connection-handler.js --- a/lib/components/keyserver-connection-handler.js +++ b/lib/components/keyserver-connection-handler.js @@ -20,15 +20,17 @@ const dispatchActionPromise = useDispatchActionPromise(); const callLogOut = useLogOut(); - const hasConnectionIssue = useSelector( - state => !!connectionSelector(keyserverID)(state)?.connectionIssue, - ); + const shouldLogOut = useSelector(state => { + const connectionIssue = + connectionSelector(keyserverID)(state)?.connectionIssue; + return !!connectionIssue && connectionIssue !== 'temporarily_connected'; + }); React.useEffect(() => { - if (hasConnectionIssue) { + if (shouldLogOut) { void dispatchActionPromise(logOutActionTypes, callLogOut()); } - }, [callLogOut, hasConnectionIssue, dispatchActionPromise]); + }, [callLogOut, shouldLogOut, dispatchActionPromise]); if (keyserverID !== ashoatKeyserverID) { return null;