Revert "experiment: clear socket_async_http_abort_tracker?"

This reverts commit 74581471c0.
This commit is contained in:
Alistair Smith
2025-06-05 16:03:01 -07:00
parent 74581471c0
commit 3e2b64efc1
2 changed files with 1 additions and 8 deletions

View File

@@ -8,7 +8,6 @@ const JSValue = jsc.JSValue;
const Async = bun.Async;
const WTFStringImpl = @import("../string.zig").WTFStringImpl;
const WebWorker = @This();
const http = @import("../http.zig");
const RefCount = bun.ptr.ThreadSafeRefCount(@This(), "ref_count", deinit, .{});
pub const new = bun.TrivialNew(@This());
pub const ref = RefCount.ref;
@@ -627,9 +626,6 @@ pub fn exitAndDeinit(this: *WebWorker) noreturn {
}
bun.uws.onThreadExit();
http.cleanupHTTPSocketTrackerForCurrentThread();
this.freeWithoutDeinit();
if (vm_to_deinit) |vm| {

View File

@@ -45,6 +45,7 @@ const Batch = bun.ThreadPool.Batch;
const TaggedPointerUnion = @import("./ptr.zig").TaggedPointerUnion;
const DeadSocket = opaque {};
var dead_socket = @as(*DeadSocket, @ptrFromInt(1));
//TODO: this needs to be freed when Worker Threads are implemented
var socket_async_http_abort_tracker = std.AutoArrayHashMap(u32, uws.InternalSocket).init(bun.default_allocator);
var async_http_id_monotonic: std.atomic.Value(u32) = std.atomic.Value(u32).init(0);
const MAX_REDIRECT_URL_LENGTH = 128 * 1024;
@@ -4932,7 +4933,3 @@ pub const Headers = struct {
return headers;
}
};
pub fn cleanupHTTPSocketTrackerForCurrentThread() void {
socket_async_http_abort_tracker.clearRetainingCapacity();
}