Skip to content

Commit 77ee514

Browse files
committed
Node.js streams: Add forkpoint for renderWithRestartOnCacheMissInValidation
1 parent 50f0d1d commit 77ee514

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

packages/next/src/server/app-render/app-render.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6380,6 +6380,9 @@ async function renderWithRestartOnCacheMissInValidation(
63806380
}> {
63816381
const { componentMod: ComponentMod } = ctx
63826382
const { clientModules } = getClientReferenceManifest()
6383+
const renderFlightStream = process.env.__NEXT_USE_NODE_STREAMS
6384+
? renderToNodeFlightStream
6385+
: renderToWebFlightStream
63836386

63846387
let startTime = -Infinity
63856388
let requestStore: RequestStore = initialRequestStore
@@ -6444,7 +6447,7 @@ async function renderWithRestartOnCacheMissInValidation(
64446447

64456448
const stream = workUnitAsyncStorage.run(
64466449
requestStore,
6447-
renderToWebFlightStream,
6450+
renderFlightStream,
64486451
ComponentMod,
64496452
initialRscPayload,
64506453
clientModules,
@@ -6545,7 +6548,7 @@ async function renderWithRestartOnCacheMissInValidation(
65456548

65466549
const stream = workUnitAsyncStorage.run(
65476550
requestStore,
6548-
renderToWebFlightStream,
6551+
renderFlightStream,
65496552
ComponentMod,
65506553
finalRscPayload,
65516554
clientModules,

0 commit comments

Comments
 (0)