Skip to content

Commit

Permalink
Pass cancellation reason to abort
Browse files Browse the repository at this point in the history
  • Loading branch information
sebmarkbage committed Oct 18, 2023
1 parent a419575 commit 54e394e
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions packages/react-dom/src/server/ReactDOMFizzServerBrowser.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ function renderToReadableStream(
},
cancel: (reason): ?Promise<void> => {
stopFlowing(request);
abort(request);
abort(request, reason);
},
},
// $FlowFixMe[prop-missing] size() methods are not allowed on byte streams.
Expand Down Expand Up @@ -161,7 +161,7 @@ function resume(
},
cancel: (reason): ?Promise<void> => {
stopFlowing(request);
abort(request);
abort(request, reason);
},
},
// $FlowFixMe[prop-missing] size() methods are not allowed on byte streams.
Expand Down
2 changes: 1 addition & 1 deletion packages/react-dom/src/server/ReactDOMFizzServerBun.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ function renderToReadableStream(
},
cancel: (reason): ?Promise<void> => {
stopFlowing(request);
abort(request);
abort(request, reason);
},
},
// $FlowFixMe[prop-missing] size() methods are not allowed on byte streams.
Expand Down
4 changes: 2 additions & 2 deletions packages/react-dom/src/server/ReactDOMFizzServerEdge.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ function renderToReadableStream(
},
cancel: (reason): ?Promise<void> => {
stopFlowing(request);
abort(request);
abort(request, reason);
},
},
// $FlowFixMe[prop-missing] size() methods are not allowed on byte streams.
Expand Down Expand Up @@ -161,7 +161,7 @@ function resume(
},
cancel: (reason): ?Promise<void> => {
stopFlowing(request);
abort(request);
abort(request, reason);
},
},
// $FlowFixMe[prop-missing] size() methods are not allowed on byte streams.
Expand Down
2 changes: 1 addition & 1 deletion packages/react-dom/src/server/ReactDOMFizzStaticBrowser.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ function prerender(
},
cancel: (reason): ?Promise<void> => {
stopFlowing(request);
abort(request);
abort(request, reason);
},
},
// $FlowFixMe[prop-missing] size() methods are not allowed on byte streams.
Expand Down
2 changes: 1 addition & 1 deletion packages/react-dom/src/server/ReactDOMFizzStaticEdge.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ function prerender(
},
cancel: (reason): ?Promise<void> => {
stopFlowing(request);
abort(request);
abort(request, reason);
},
},
// $FlowFixMe[prop-missing] size() methods are not allowed on byte streams.
Expand Down

0 comments on commit 54e394e

Please sign in to comment.