()
| 561 | }; |
| 562 | |
| 563 | const closeWrapped = () => { |
| 564 | // We skip errors in fsync |
| 565 | if (this.#fd !== 1 && this.#fd !== 2) { |
| 566 | this.#fs.close(this.#fd, done); |
| 567 | } else { |
| 568 | done(); |
| 569 | } |
| 570 | }; |
| 571 | |
| 572 | try { |
| 573 | this.#fs.fsync(this.#fd, closeWrapped); |