atproto utils for zig zat.dev
atproto sdk zig

transport: bound the response-head phase with a deadline master

StallGuard only watches body bytes, so connect, TLS, request send, and receiveHead were unbounded: a peer that accepts and never answers (the 2026-08-13 zlay authority stall) held a caller until the kernel gave up (~2min for an unanswered SYN) or forever on an established socket. head_deadline_ns (default 10s, 0 disables) runs each fetch attempt as a task and cancels it if no response head arrives in time, surfacing error.ResponseHeadTimeout. Once the head is seen, the body remains StallGuard's problem. Mirrors indigo's identity directory client, which deadlines every phase (10s client timeout, 3s dial). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>


+111 -4
1 changed file