mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-03-22 04:34:44 +00:00
Move all curl_easy ops to Connection
This commit is contained in:
@@ -21,6 +21,7 @@ pub const LightPanda = struct {
|
||||
mutex: std.Thread.Mutex,
|
||||
cond: Thread.Condition,
|
||||
connection: Http.Connection,
|
||||
config: *const Config,
|
||||
pending: std.DoublyLinkedList,
|
||||
mem_pool: std.heap.MemoryPool(LightPandaEvent),
|
||||
|
||||
@@ -40,6 +41,7 @@ pub const LightPanda = struct {
|
||||
.running = true,
|
||||
.allocator = allocator,
|
||||
.connection = connection,
|
||||
.config = app.config,
|
||||
.mem_pool = std.heap.MemoryPool(LightPandaEvent).init(allocator),
|
||||
};
|
||||
}
|
||||
@@ -109,7 +111,7 @@ pub const LightPanda = struct {
|
||||
}
|
||||
|
||||
try self.connection.setBody(aw.written());
|
||||
const status = try self.connection.request();
|
||||
const status = try self.connection.request(&self.config.http_headers);
|
||||
|
||||
if (status != 200) {
|
||||
log.warn(.telemetry, "server error", .{ .status = status });
|
||||
|
||||
Reference in New Issue
Block a user