Commit 7ee0be7 1 parent ddf7518 commit 7ee0be7 Copy full SHA for 7ee0be7
File tree 1 file changed +8
-6
lines changed
1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -287,14 +287,16 @@ function formatResult(data) {
287
287
}
288
288
289
289
function sendResult ( data ) {
290
- if ( process . send && Object . hasOwn ( process . env , 'NODE_RUN_BENCHMARK_FN' ) ) {
290
+ if ( process . send ) {
291
291
// If forked, report by process send
292
292
process . send ( data , ( ) => {
293
- // If, for any reason, the process is unable to self close within
294
- // a second after completing, forcefully close it.
295
- setTimeout ( ( ) => {
296
- process . exit ( 0 ) ;
297
- } , 5000 ) . unref ( ) ;
293
+ if ( Object . hasOwn ( process . env , 'NODE_RUN_BENCHMARK_FN' ) ) {
294
+ // If, for any reason, the process is unable to self close within
295
+ // a second after completing, forcefully close it.
296
+ setTimeout ( ( ) => {
297
+ process . exit ( 0 ) ;
298
+ } , 5000 ) . unref ( ) ;
299
+ }
298
300
} ) ;
299
301
} else {
300
302
// Otherwise report by stdout
You can’t perform that action at this time.
0 commit comments