Skip to content

headersTimeout on Agent appears to be broken since 6.20.0 #3798

Description

@Stono

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    DocsChanges related to the documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions