Skip to content

Commit

Permalink
registerAbort: Don't infinite-retry if reason is 'unexpected'
Browse files Browse the repository at this point in the history
I'm not aware of any actual cases of this happening. But with a
totally unexpected error, we don't really have reason to hope that
infinite-retrying will help a /register succeed, so we should abort
and let the user know.
  • Loading branch information
chrisbobbe committed Mar 9, 2022
1 parent 091d9ed commit 11cbbd1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/message/fetchActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ export const registerAbort = (reason: RegisterAbortReason): ThunkAction<Promise<
getState,
) => {
dispatch(registerAbortPlain(reason));
if (getHaveServerData(getState())) {
if (getHaveServerData(getState()) && reason !== 'unexpected') {
// Try again, forever if necessary; the user has an interactable UI and
// can look at stale data while waiting.
//
Expand Down

0 comments on commit 11cbbd1

Please sign in to comment.