Skip to content

Commit

Permalink
undo
Browse files Browse the repository at this point in the history
  • Loading branch information
cirospaciari committed Oct 12, 2024
1 parent 992175b commit d8d42c0
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/bun.js/api/bun/h2_frame_parser.zig
Original file line number Diff line number Diff line change
Expand Up @@ -3819,7 +3819,7 @@ pub const H2FrameParser = struct {
}
var it = this.streams.valueIterator();
while (it.next()) |stream| {
stream.freeResources(this, false);
stream.freeResources(this, true);
}
this.streams.deinit();
}
Expand All @@ -3836,10 +3836,7 @@ pub const H2FrameParser = struct {
this.ref_count -= 1;

if (ref_count == 1) {
// never deinit inside a finalizer
const task = bun.default_allocator.create(JSC.AnyTask) catch unreachable;
task.* = JSC.AnyTask.New(H2FrameParser, deinit).init(this);
this.globalThis.bunVM().enqueueTask(JSC.Task.init(task));
this.deinit();
}
}

Expand Down

0 comments on commit d8d42c0

Please sign in to comment.