Skip to content

[Feature request] Expose native HTTP completion after cancellation #491

Open

Description

@qq382724935

Versions: blob-util 0.25.0, RN 0.86.3; HTTP(S) fetch tasks.

cancel() requests native cancellation and immediately rejects the JS promise. The native fetch terminal callback can arrive later. Thus .catch()/.finally() cannot tell an uploader when native code has stopped using its temporary source file.

Repro at the JS/native boundary: call cancel(), await the rejected task, then deliver the native fetch callback. JS has already settled; there is no public notification for the later terminal event.

Request: expose a terminal callback/promise driven by the native fetch completion callback, including after cancellation. Keep cancellation-request acknowledgement separate from actual completion.

This concerns safe source-file cleanup, not whether cancellation stops a download (#370). Verified with the real JS adapter and controlled native callbacks.

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

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions