Skip to content

Commit 539c824

Browse files
committed
stream: apply multiple stream/iter cleanups
1 parent f857c23 commit 539c824

File tree

11 files changed

+307
-372
lines changed

11 files changed

+307
-372
lines changed

lib/internal/fs/promises.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -695,6 +695,13 @@ if (getOptionValue('--experimental-stream-iter')) {
695695
closed = true;
696696
handle[kLocked] = false;
697697
handle[kUnref]();
698+
if (autoClose) {
699+
// The close call will return a promise. On the off chance
700+
// the rejects we'll end up with an unhandled rejection.
701+
// TODO(@jasnell): Add a closeSync method to the underlying
702+
// C++ FileHandle handle.
703+
handle.close();
704+
}
698705
},
699706

700707
async [SymbolAsyncDispose]() {

0 commit comments

Comments
 (0)