From df1b07af2c7e60b99ea5bf4a9db5a0024859a3c0 Mon Sep 17 00:00:00 2001 From: Token <305755057+TokenPLS@users.noreply.github.com> Date: Tue, 13 Oct 2026 23:10:59 +1100 Subject: [PATCH] fix: a sub-millisecond URL test is reported as a failure (#3316) --- adapter/adapter.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/adapter/adapter.go b/adapter/adapter.go index 6f20c08ab..422232b33 100644 --- a/adapter/adapter.go +++ b/adapter/adapter.go @@ -275,6 +275,11 @@ func (p *Proxy) URLTest(ctx context.Context, url string, expectedStatus utils.In satisfied = resp != nil && (expectedStatus == nil || expectedStatus.Check(uint16(resp.StatusCode))) t = uint16(time.Since(start) / time.Millisecond) + if t == 0 { + // a zero delay means a failed test to callers, so report a test + // that completed in under a millisecond as 1 ms + t = 1 + } return }