Skip to content

Commit

Permalink
fix: restore execution context after RetryAfterError completed
Browse files Browse the repository at this point in the history
  • Loading branch information
eps1lon committed Jun 29, 2021
1 parent 2ff9c68 commit 7f9e7a9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/react-reconciler/src/ReactFiberWorkLoop.new.js
Original file line number Diff line number Diff line change
Expand Up @@ -813,6 +813,8 @@ function performConcurrentWorkOnRoot(root, didTimeout) {
lanes = errorRetryLanes;
exitStatus = renderRootSync(root, errorRetryLanes);
}

executionContext &= ~RetryAfterError;
}

if (exitStatus === RootFatalErrored) {
Expand Down Expand Up @@ -1006,6 +1008,8 @@ function performSyncWorkOnRoot(root) {
lanes = errorRetryLanes;
exitStatus = renderRootSync(root, lanes);
}

executionContext &= ~RetryAfterError;
}

if (exitStatus === RootFatalErrored) {
Expand Down
4 changes: 4 additions & 0 deletions packages/react-reconciler/src/ReactFiberWorkLoop.old.js
Original file line number Diff line number Diff line change
Expand Up @@ -813,6 +813,8 @@ function performConcurrentWorkOnRoot(root, didTimeout) {
lanes = errorRetryLanes;
exitStatus = renderRootSync(root, errorRetryLanes);
}

executionContext &= ~RetryAfterError;
}

if (exitStatus === RootFatalErrored) {
Expand Down Expand Up @@ -1006,6 +1008,8 @@ function performSyncWorkOnRoot(root) {
lanes = errorRetryLanes;
exitStatus = renderRootSync(root, lanes);
}

executionContext &= ~RetryAfterError;
}

if (exitStatus === RootFatalErrored) {
Expand Down

0 comments on commit 7f9e7a9

Please sign in to comment.