diff --git a/lib/keyserver-conn/call-keyserver-endpoint-provider.react.js b/lib/keyserver-conn/call-keyserver-endpoint-provider.react.js --- a/lib/keyserver-conn/call-keyserver-endpoint-provider.react.js +++ b/lib/keyserver-conn/call-keyserver-endpoint-provider.react.js @@ -72,6 +72,7 @@ +currentUserInfo: ?CurrentUserInfo, +isSocketConnected: boolean, +sessionRecoveryInProgress: boolean, + +canRecoverSession?: ?boolean, +lastCommunicatedPlatformDetails: ?PlatformDetails, }; type BindServerCallsParams = $ReadOnly<{ @@ -99,6 +100,7 @@ sessionID, currentUserInfo, isSocketConnected, + canRecoverSession, lastCommunicatedPlatformDetails, keyserverID, } = params; @@ -118,7 +120,8 @@ undefined, keyserverID, ); - const canResolveInvalidation = canResolveKeyserverSessionInvalidation(); + const canResolveInvalidation = + canRecoverSession && canResolveKeyserverSessionInvalidation(); // This function gets called before callSingleKeyserverEndpoint sends a // request, to make sure that we're not in the middle of trying to recover // an invalidated cookie @@ -256,6 +259,7 @@ (params: ServerCallSelectorParams) => params.currentUserInfo, (params: ServerCallSelectorParams) => params.isSocketConnected, (params: ServerCallSelectorParams) => params.sessionRecoveryInProgress, + (params: ServerCallSelectorParams) => params.canRecoverSession, (params: ServerCallSelectorParams) => params.lastCommunicatedPlatformDetails, ( @@ -266,6 +270,7 @@ currentUserInfo: ?CurrentUserInfo, isSocketConnected: boolean, sessionRecoveryInProgress: boolean, + canRecoverSession: ?boolean, lastCommunicatedPlatformDetails: ?PlatformDetails, ) => bindCookieAndUtilsIntoCallSingleKeyserverEndpoint({ @@ -276,6 +281,7 @@ currentUserInfo, isSocketConnected, sessionRecoveryInProgress, + canRecoverSession, lastCommunicatedPlatformDetails, keyserverID, }), @@ -312,6 +318,7 @@ ...keyserverCallInfo, dispatch, currentUserInfo, + canRecoverSession: true, }); }, [