Unverified Commit 14fb290d authored by Joseph's avatar Joseph Committed by GitHub

[backport] Fix use cache prerender signal retention (#98448)

Backports [#97476](https://github.com/vercel/next.js/pull/97476) ("Fix
use cache prerender signal retention") to `next-16-3`.

Cherry-picked from 4a95af80, no
conflicts. The hunk applied against identical surrounding context; only
the line offset differs.

<!-- NEXT_JS_LLM -->

🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: 's avatarJosh Story <gnoff@storyposted.com>
parent 2b1f28db
...@@ -1405,8 +1405,13 @@ async function generateCacheEntryImpl( ...@@ -1405,8 +1405,13 @@ async function generateCacheEntryImpl(
) )
clearTimeout(timer) clearTimeout(timer)
const didTimeout = timeoutAbortController.signal.aborted
if (dynamicAccessAbortSignal) {
// Release React's listener from the composite signal.
timeoutAbortController.abort()
}
if (timeoutAbortController.signal.aborted) { if (didTimeout) {
// When the timeout is reached we always error the stream. Even for // When the timeout is reached we always error the stream. Even for
// fallback shell prerenders we don't want to return a hanging promise, // fallback shell prerenders we don't want to return a hanging promise,
// which would allow the function to become a dynamic hole. Because that // which would allow the function to become a dynamic hole. Because that
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment