Skip to content

AHC may crash if an read idle timeout is set, but a running request fails before receiving http .end #453

Closed
@fabianfett

Description

@fabianfett

Currently we only clear the idle read timer, if we receive an http .end.

However if the request is cancelled or the connection fails, we may never receive such an event. For this reason we should ensure in

private var request: HTTPExecutableRequest? {
didSet {

with a willSet method that a running idleReadTimeoutTimer is cancelled. Currently we may run into a precondition if:

Currently we should run into a precondition, if the following happens:

  1. On an HTTPClient that has idleTimeout enabled a request is sent
  2. The remote server waits to receive the full request and closes the connection without sending a response
  3. The HTTPClient and its ELG must be kept alive for at least the idleTimeout duration

We should run into the precondition here:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions