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

main

Commit

Soph3mo ago

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

Integrate EntireDB Commands into CLI

Claude CodeOpus 4.8
View session
Checkpoint 1

HTTP Connection Reuse and Probe Draining

Claude CodeOpus 4.8[1m]
View session
Checkpoint 1