Skip to content

Lightpanda: the headless browser designed for AI and automation

discard if failure after single_flight enter

Muki Kiboigocc5537dd63f7
diff --git a/src/network/RobotsGate.zig b/src/network/RobotsGate.zig
index a4692de27..a1d723b04 100644
--- a/src/network/RobotsGate.zig
+++ b/src/network/RobotsGate.zig
@@ -90,6 +90,7 @@ fn fetchThenResume(self: *RobotsGate, robots_url: [:0]const u8, transfer: *Trans
const owned_url = try arena.dupeZ(u8, robots_url);
const result = try self.single_flight.enter(owned_url, transfer, .robots);
+ errdefer self.single_flight.discard(owned_url);
if (result == .queued) {
// Someone else already owns an in-flight fetch for this key
// (under its own, earlier-allocated owned_url). This arena was