Skip to content

Commit 111e749

Browse files
committed
fix(io): also close when the host stream closes without an error
1 parent 7764497 commit 111e749

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎src/node.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -435,6 +435,7 @@ function closeHostOut(s: NodeJS.WriteStream, fd: number) {
435435
// runs once the writes before it are done
436436
s.write("", close);
437437
s.once("error", close);
438+
s.once("close", close);
438439
}
439440

440441
// What HotSpot does on the first OutOfMemoryError: it prints the commands and

0 commit comments

Comments
 (0)