MCPcopy
hub / github.com/facebook/react / startFlowingDebug

Function startFlowingDebug

packages/react-server/src/ReactFlightServer.js:6071–6094  ·  view source on GitHub ↗
(
  request: Request,
  debugDestination: Destination,
)

Source from the content-addressed store, hash-verified

6069}
6070
6071export function startFlowingDebug(
6072 request: Request,
6073 debugDestination: Destination,
6074): void {
6075 if (request.status === CLOSING) {
6076 request.status = CLOSED;
6077 closeWithError(debugDestination, request.fatalError);
6078 return;
6079 }
6080 if (request.status === CLOSED) {
6081 return;
6082 }
6083 if (request.debugDestination !== null) {
6084 // We're already flowing.
6085 return;
6086 }
6087 request.debugDestination = debugDestination;
6088 try {
6089 flushCompletedChunks(request);
6090 } catch (error) {
6091 logRecoverableError(request, error, null);
6092 fatalError(request, error);
6093 }
6094}
6095
6096export function stopFlowing(request: Request): void {
6097 request.destination = null;

Callers 15

renderToReadableStreamFunction · 0.90
renderToReadableStreamFunction · 0.90
renderToPipeableStreamFunction · 0.90
renderToReadableStreamFunction · 0.90
renderToReadableStreamFunction · 0.90
renderToReadableStreamFunction · 0.90
renderToPipeableStreamFunction · 0.90
renderToReadableStreamFunction · 0.90
renderToPipeableStreamFunction · 0.90
renderToReadableStreamFunction · 0.90
renderToReadableStreamFunction · 0.90
renderToReadableStreamFunction · 0.90

Calls 4

closeWithErrorFunction · 0.90
flushCompletedChunksFunction · 0.85
logRecoverableErrorFunction · 0.70
fatalErrorFunction · 0.70

Tested by

no test coverage detected