mirror: drain probe body before close so the idle pool works
main·
Commit

probeClient is built with a small idle pool and a 90s IdleConnTimeout specifically to reuse the TLS session across the 2s clone-readiness probes. But Go's transport only returns a connection to the idle pool when the response body is read to EOF before Close. mirrorAdvertisesHead closed the body without draining, and the sr.Decode/adv.Decode error returns leave it partially read, so the connection was discarded instead of pooled — every probe paid a fresh TLS handshake, defeating the pool.
Drain the body (bounded by maxProbeBytes) before closing.
Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com Entire-Checkpoint: bf42c15ed2b6
Checkpoints
Checkpoint 1
Checkpoint 1