Skip to content

Commit

Permalink
Await the flush of the trace write stream to make sure trace file is …
Browse files Browse the repository at this point in the history
…written
  • Loading branch information
mknichel committed Oct 27, 2023
1 parent ec8ee59 commit ca5fd68
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/next/src/trace/report/to-json.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ export default {
const phase = traceGlobals.get('phase')
// Only end writeStream when manually flushing in production
if (phase !== PHASE_DEVELOPMENT_SERVER) {
writeStream.end()
return writeStream.end()
}
})
: undefined,
Expand Down

0 comments on commit ca5fd68

Please sign in to comment.