diff options
Diffstat (limited to 'ext/node/polyfills/internal_binding/stream_wrap.ts')
-rw-r--r-- | ext/node/polyfills/internal_binding/stream_wrap.ts | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/node/polyfills/internal_binding/stream_wrap.ts b/ext/node/polyfills/internal_binding/stream_wrap.ts index 4d2c8c4d7..27870b20b 100644 --- a/ext/node/polyfills/internal_binding/stream_wrap.ts +++ b/ext/node/polyfills/internal_binding/stream_wrap.ts @@ -279,7 +279,7 @@ export class LibuvStreamWrap extends HandleWrap { /** Internal method for reading from the attached stream. */ async #read() { - let buf = new Uint8Array(SUGGESTED_SIZE); + let buf = BUF; let nread: number | null; try { @@ -375,3 +375,5 @@ export class LibuvStreamWrap extends HandleWrap { return; } } + +const BUF = new Uint8Array(SUGGESTED_SIZE); |