Skip to content

Commit 76e889b

Browse files
committed
stream: apply multiple stream/iter cleanups
1 parent 7cc6f59 commit 76e889b

11 files changed

Lines changed: 307 additions & 372 deletions

File tree

lib/internal/fs/promises.js

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

703710
async [SymbolAsyncDispose]() {

0 commit comments

Comments
 (0)