diff options
author | 2021-12-29 02:32:57 -0800 | |
---|---|---|
committer | 2021-12-29 02:32:57 -0800 | |
commit | fe17d51b03cf3fcbbf50621afbb47d56eaeaa5c6 (patch) | |
tree | fae310415b0d334823be70c59a851b7f90bf9ecb /src/thread_pool.zig | |
parent | 565cf23d9263ea153b8cb7d6f67a6c534b40ceeb (diff) | |
download | bun-fe17d51b03cf3fcbbf50621afbb47d56eaeaa5c6.tar.gz bun-fe17d51b03cf3fcbbf50621afbb47d56eaeaa5c6.tar.zst bun-fe17d51b03cf3fcbbf50621afbb47d56eaeaa5c6.zip |
FIx bug in http client
Diffstat (limited to '')
-rw-r--r-- | src/thread_pool.zig | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/thread_pool.zig b/src/thread_pool.zig index 4df199006..1b39f2606 100644 --- a/src/thread_pool.zig +++ b/src/thread_pool.zig @@ -248,8 +248,8 @@ noinline fn wait(self: *ThreadPool, _is_waking: bool) error{Shutdown}!bool { } else { if (self.io) |io| { const HTTP = @import("http"); - io.run_for_ns(std.time.ns_per_us * 100) catch {}; - while (HTTP.AsyncHTTP.active_requests_count.load(.Monotonic) > 255) { + io.run_for_ns(std.time.ns_per_us * 10) catch {}; + while (HTTP.AsyncHTTP.active_requests_count.load(.Monotonic) > HTTP.AsyncHTTP.max_simultaneous_requests) { io.tick() catch {}; } sync = @bitCast(Sync, self.sync.load(.Monotonic)); |