Skip to content

HTTPClient timeout overrides timeout set in HTTPClient.execute(_:timeout:logger:) #825

Open
@adam-fowler

Description

@adam-fowler

If I create a HTTPClient as follows

let httpClient = HTTPClient(
    eventLoopGroup: MultiThreadedEventLoopGroup.singleton,
    configuration: .init(timeout: Timeout(read: .seconds(90))
)

and then call

let response = httpClient(request, timeout: .minutes(10), logger: logger)

the timeout in the execute call is ignored if it is longer than HTTPClient timeout.

This is particularly frustrating as HTTPClient.shared sets the timeout to be 90 seconds

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugFeature doesn't work as expected.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions