Skip to content

Request cancellation implemented in cats-effect #1178

Description

@istreeter

Hi maintainers, this is just to make you aware of a PR I opened in cats-effect: typelevel/cats-effect#4375

The PR is directly relevant to http4s-jdk-http-client, because it changes what happens when a request is cancelled when using this library.

This is the code I tested with:

client.expect[String](request).timeoutTo(1.second, IO.unit)

Without my cats-effect PR, I can see in wireshark the HTTP request runs to completion after 5 seconds, even though .timeoutTo cancelled the cats-effect fiber after 1 second. After my PR, I can see in wireshark the network request is cancelled after 1 second. For HTTP/1 I see a RST which closes the TCP connection. For HTTP/2 I see a RST_STREAM which cancels the request without closing the TCP connection.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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