File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -287,14 +287,16 @@ function formatResult(data) {
287287}
288288
289289function sendResult ( data ) {
290- if ( process . send && Object . hasOwn ( process . env , 'NODE_RUN_BENCHMARK_FN' ) ) {
290+ if ( process . send ) {
291291 // If forked, report by process send
292292 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+ }
298300 } ) ;
299301 } else {
300302 // Otherwise report by stdout
You can’t perform that action at this time.
0 commit comments