Bug Description
Using fetch with an undici agent with configuration such as new Agent({ headersTimeout: 1}) on 6.19.8 would correctly throw a UND_ERR_HEADERS_TIMEOUT error whereas on 6.20.0 and 6.20.1 the request just hangs.
This was caught by some tests we have around our http client that ensures timeouts work, and they started failing after the undici bump.
Reproducible By
As above really.
Expected Behavior
UND_ERR_HEADERS_TIMEOUT to throw on a headers timeout.
Logs & Screenshots
Environment
node v22.5.1
undici v6.20.x
Additional context
Bug Description
Using
fetchwith anundiciagent with configuration such asnew Agent({ headersTimeout: 1})on6.19.8would correctly throw aUND_ERR_HEADERS_TIMEOUTerror whereas on6.20.0and6.20.1the request just hangs.This was caught by some tests we have around our http client that ensures timeouts work, and they started failing after the
undicibump.Reproducible By
As above really.
Expected Behavior
UND_ERR_HEADERS_TIMEOUTto throw on a headers timeout.Logs & Screenshots
Environment
node v22.5.1
undici v6.20.x
Additional context