File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -121,11 +121,12 @@ function createFinalResult(
121
121
componentName : string ,
122
122
throwJsErrors : boolean
123
123
) : null | string | Promise < RenderResult > {
124
- // Node can handle multiple rendering requests simultaneously.
125
124
// Console history is stored globally in `console.history`.
126
- // To prevent cross-request data leakage:
127
- // 1. We build the consoleReplayScript here, before any async operations.
128
- // 2. The console history is reset after the sync part of each request.
125
+ // If node renderer is handling a render request that returns a promise,
126
+ // It can handle another request while awaiting the promise.
127
+ // To prevent cross-request console logs leakage between these requests,
128
+ // we build the consoleReplayScript before awaiting any promises.
129
+ // The console history is reset after the synchronous part of each request.
129
130
// This causes console logs happening during async operations to not be captured.
130
131
const consoleReplayScript = buildConsoleReplay ( ) ;
131
132
You can’t perform that action at this time.
0 commit comments