Skip to content

Commit

Permalink
[revert this] remove setTimeout delays
Browse files Browse the repository at this point in the history
  • Loading branch information
lubieowoce committed Jun 4, 2024
1 parent dd26623 commit 66cbd34
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,9 @@ export function getRender({
'DEBUG | next-edge-ssr-loader :: waitUntil(onClose promise)'
)
event.waitUntil(
new Promise<void>((resolve) =>
extendedRes.onClose(() => setTimeout(resolve))
new Promise<void>(
(resolve) => extendedRes.onClose(resolve)
// (resolve) => extendedRes.onClose(() => setTimeout(resolve))
).then(() =>
console.log(
'DEBUG | next-edge-ssr-loader :: onClose promise resolved'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ export function installInvocationShutdownHook() {

onClose(async () => {
// make sure other onClose callbacks had a chance to run
await new Promise((resolve) => setTimeout(resolve))
// await new Promise((resolve) => setTimeout(resolve))
context.shutdownHook()
})
}
Expand Down

0 comments on commit 66cbd34

Please sign in to comment.