Skip to content

Commit 246adc3

Browse files
committed
removed async_hooks
1 parent 6ade2a7 commit 246adc3

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

lib/internal/streams/end-of-stream.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ const {
4444
kIsClosedPromise,
4545
} = require('internal/streams/utils');
4646

47-
const { getHookArrays } = require('internal/async_hooks');
4847
const AsyncContextFrame = require('internal/async_context_frame');
4948

5049
// Lazy load
@@ -69,8 +68,7 @@ function eos(stream, options, callback) {
6968
validateFunction(callback, 'callback');
7069
validateAbortSignal(options.signal, 'options.signal');
7170

72-
if (AsyncContextFrame.current() ||
73-
getHookArrays()[0].length > 0) {
71+
if (AsyncContextFrame.current()) {
7472
AsyncLocalStorage ??= require('async_hooks').AsyncLocalStorage;
7573
callback = once(AsyncLocalStorage.bind(callback));
7674
} else {

0 commit comments

Comments
 (0)