Don't invalidate previous file descriptro to avoid tripping assertion

This commit is contained in:
Jarred Sumner
2022-12-03 08:25:58 -08:00
parent 8c51db0879
commit 201cbb20e4

View File

@@ -1196,11 +1196,6 @@ pub const FileSink = struct {
}
pub fn start(this: *FileSink, stream_start: StreamStart) JSC.Node.Maybe(void) {
if (this.fd != bun.invalid_fd) {
_ = JSC.Node.Syscall.close(this.fd);
this.fd = bun.invalid_fd;
}
this.done = false;
this.written = 0;
this.auto_close = false;