mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-03-31 09:29:42 +00:00
try safer http cleanup on page deinit
This commit is contained in:
@@ -77,6 +77,13 @@ pub fn init(input: Input, options: ?RequestInit, page: *Page) !js.Promise {
|
||||
return fetch._resolver.promise();
|
||||
}
|
||||
|
||||
pub fn deinit(self: *Fetch) void {
|
||||
if (self.transfer) |transfer| {
|
||||
transfer.abort();
|
||||
self.transfer = null;
|
||||
}
|
||||
}
|
||||
|
||||
fn httpHeaderDoneCallback(transfer: *Http.Transfer) !void {
|
||||
const self: *Fetch = @ptrCast(@alignCast(transfer.ctx));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user