From 20dbef5b1c3037b6d397423ab068382129ca2e51 Mon Sep 17 00:00:00 2001 From: zzstoatzz Date: Mon, 3 Aug 2026 10:44:37 -0500 Subject: [PATCH] Revert "subscriber: keep DNS + connect on pool_io (revert 7593655)" This reverts commit 3391dbaa99636611c8cb70dd77004272ecf4467d. --- src/internal/subscriber.zig | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/internal/subscriber.zig b/src/internal/subscriber.zig index b9a233a..2b195d6 100644 --- a/src/internal/subscriber.zig +++ b/src/internal/subscriber.zig @@ -310,12 +310,13 @@ pub const Subscriber = struct { } const path = w.buffered(); - // DNS + TCP connect run on pool_io (Threaded), then TLS + WebSocket - // I/O run on self.io. This split is deliberate and load-bearing: it - // dates to the Evented attempt, where Io.Uring had no netLookup, and - // docs/stdlib-patches.md documents it as workaround 2. Removing it - // was tried on 2026-08-01 and did not help the zio backend, so the - // documented arrangement stands. + // Connect on the same io that will read the socket. The old split — + // DNS + connect on pool_io, then TLS + WebSocket on self.io — existed + // because Io.Uring never implemented netLookup. Under Threaded both + // are the same backend, so it was a no-op; under any evented backend + // it hands a foreign-domain fd to the reader, which is a defect (a + // blocking fd read from a fiber). Backends that lack netLookup are + // expected to delegate it, not to have callers route around them. // // each phase labels its catch site so operators can see which layer // is failing across the fleet via relay_subscriber_disconnect_total. @@ -323,7 +324,7 @@ pub const Subscriber = struct { _ = self.bc.stats.subscriber_disconnect_dns_connect.fetchAdd(1, .monotonic); return e; }; - const net_stream = host_name.connect(self.pool_io orelse self.io, 443, .{ .mode = .stream }) catch |e| { + const net_stream = host_name.connect(self.io, 443, .{ .mode = .stream }) catch |e| { _ = self.bc.stats.subscriber_disconnect_dns_connect.fetchAdd(1, .monotonic); return e; }; -- 2.51.2