diff --git a/lib/reducers/keyserver-reducer.js b/lib/reducers/keyserver-reducer.js --- a/lib/reducers/keyserver-reducer.js +++ b/lib/reducers/keyserver-reducer.js @@ -108,6 +108,10 @@ keyserverInfo: { ...state.keyserverInfos[keyserverID], cookie: null, + connection: { + ...state.keyserverInfos[keyserverID].connection, + sessionRecoveryInProgress: false, + }, }, }, }); @@ -148,28 +152,19 @@ newKeyserverInfo = { ...newKeyserverInfo, cookie: sessionChange.cookie, - }; - keyserverUpdated = true; - } - if (sessionChange.cookieInvalidated) { - newKeyserverInfo = { - ...newKeyserverInfo, connection: { ...newKeyserverInfo.connection, - queuedActivityUpdates: [], + sessionRecoveryInProgress: false, }, }; keyserverUpdated = true; } - if ( - state.keyserverInfos[keyserverID].connection.sessionRecoveryInProgress && - (gotUserCookie || sessionChange.cookieInvalidated) - ) { + if (sessionChange.cookieInvalidated) { newKeyserverInfo = { ...newKeyserverInfo, connection: { ...newKeyserverInfo.connection, - sessionRecoveryInProgress: false, + queuedActivityUpdates: [], }, }; keyserverUpdated = true; @@ -213,6 +208,7 @@ connection: { ...state.keyserverInfos[keyserverID].connection, connectionIssue: null, + sessionRecoveryInProgress: false, }, }, }, @@ -488,6 +484,7 @@ connection: { ...oldConnection, connectionIssue: null, + sessionRecoveryInProgress: false, queuedActivityUpdates: [], lateResponses: [], }, @@ -521,6 +518,7 @@ connection: { ...oldConnection, connectionIssue: null, + sessionRecoveryInProgress: false, queuedActivityUpdates: [], lateResponses: [], },