Lightpanda: the headless browser designed for AI and automation
test,perf: Fix leaky thread in test runner
Karl Seguindb260fe02902
diff --git a/src/TestHTTPServer.zig b/src/TestHTTPServer.zigindex 2fed8d63b..d2d00a077 100644--- a/src/TestHTTPServer.zig+++ b/src/TestHTTPServer.zig@@ -81,8 +81,7 @@ fn handleConnection(self: *TestHTTPServer, conn: std.net.Server.Connection) !voiwhile (true) {var req = http_server.receiveHead() catch |err| switch (err) {- error.ReadFailed => continue,- error.HttpConnectionClosing => continue,+ error.ReadFailed, error.HttpConnectionClosing => return,else => {std.debug.print("Test HTTP Server error: {}\n", .{err});return err;diff --git a/src/cdp/testing.zig b/src/cdp/testing.zigindex 6e095a97c..b271de5b0 100644--- a/src/cdp/testing.zig+++ b/src/cdp/testing.zig@@ -48,6 +48,7 @@ const TestContext = struct {pub fn deinit(self: *TestContext) void {if (self.cdp_initialized) self.cdp_.deinit();posix.close(self.socket);+ posix.close(self.cdp_socket);base.reset();}