Skip to content

Commit 89b4b50

Browse files
committed
Delete the newly created task from abortableTasks if it immediately errors
Otherwise this will be a lingering task which means we might try to abort it when we close which would log an extra error but we've already errored.
1 parent e6b39d5 commit 89b4b50

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

‎packages/react-server/src/ReactFlightServer.js‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,7 @@ function serializeThenable(request: Request, thenable: Thenable<any>): number {
359359
},
360360
reason => {
361361
newTask.status = ERRORED;
362+
request.abortableTasks.delete(newTask);
362363
// TODO: We should ideally do this inside performWork so it's scheduled
363364
const digest = logRecoverableError(request, reason);
364365
emitErrorChunk(request, newTask.id, digest, reason);

0 commit comments

Comments
 (0)