mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 10:28:47 +00:00
fix ref counting onReaderDone (#9443)
This commit is contained in:
@@ -1228,7 +1228,11 @@ pub const PipeReader = struct {
|
||||
const owned = this.toOwnedSlice();
|
||||
this.state = .{ .done = owned };
|
||||
if (!this.isDone()) return;
|
||||
// we need to ref because the process might be done and deref inside signalDoneToCmd before we call onCloseIO
|
||||
this.ref();
|
||||
defer this.deref();
|
||||
this.signalDoneToCmd();
|
||||
|
||||
if (this.process) |process| {
|
||||
// this.process = null;
|
||||
process.onCloseIO(this.kind(process));
|
||||
|
||||
Reference in New Issue
Block a user