Skip to content

Commit 455ed79

Browse files
karlseguinsjorsdonkers
authored andcommitted
Remove HTTP client generic Loop parameter
I think we initially thought we might need different clients for different parts of the system, each with a unique loop (e.g. we thought telemetry might need some isolation). But that never happened, so it's just needless now, especially since the async connect uses the non-generic *Loop type directly.
1 parent bf1db50 commit 455ed79

File tree

3 files changed

+189
-162
lines changed

3 files changed

+189
-162
lines changed

src/app.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ pub const App = struct {
5555
.telemetry = undefined,
5656
.app_dir_path = app_dir_path,
5757
.notification = notification,
58-
.http_client = try http.Client.init(allocator, .{
58+
.http_client = try http.Client.init(allocator, loop, .{
5959
.max_concurrent = 3,
6060
.http_proxy = config.http_proxy,
6161
.proxy_type = config.proxy_type,

src/browser/xhr/xhr.zig

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,6 @@ pub const XMLHttpRequest = struct {
458458
&self.url.?.uri,
459459
self,
460460
onHttpRequestReady,
461-
self.loop,
462461
);
463462
}
464463

@@ -494,7 +493,7 @@ pub const XMLHttpRequest = struct {
494493
}
495494
}
496495

497-
try request.sendAsync(self.loop, self, .{});
496+
try request.sendAsync(self, .{});
498497
self.request = request;
499498
}
500499

0 commit comments

Comments
 (0)