Skip to content

HTTP: cancelling request not working for streaming #2557

Closed

Description

@egoist

Activity

  1. added a commit that references this issue on Mar 22, 2025
    fec2b7f
  2. amrbashir commented on Mar 22, 2025

    @amrbashir
    Member

    Could you give #2562 a try and see if there is any use cases I missed?

    I mainly tested the following case:

    const abort = new AbortController();
    const res = await fetch("someurl", { signal: abort.signal })
    const reader = res.body.getReader();
    
    reader.read() // ensure we got some data
    abort.abort() // abort the requst
    reader.read() // fails as the stream is closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions