Skip to content

Asset download fetches missing clientAbort.signal video, image gen, img2img #274

Description

@Sertug17

Bug

Three asset download fetch() calls are missing { signal: clientAbort.signal }. When the client disconnects after upstream returns but during the local cache download, the proxy continues downloading and writing to disk for nobody.

Same class as #251 (fixed in v0.12.252 for the upstream payFetch calls), but these post-response download fetches were missed.

Affected lines (current main)

Handler Line Code Signal?
/v1/videos/generations download 3215 await fetch(clip.url) ❌ missing
/v1/images/generations download 2771 await fetch(img.url) ❌ missing
/v1/images/image2image result download 2915 await fetch(img.url) ❌ missing

Working references in the same file

  • Audio download (line 3016): await fetch(track.url, { signal: clientAbort.signal })
  • img2img input download (line 2851): await fetch(val, { signal: clientAbort.signal })

Impact

  • Video files can be 50–200 MB. A disconnected client leaves the proxy downloading and writing the full file to disk, blocking the handler and wasting bandwidth.
  • Image downloads are smaller but the pattern is identical.

Fix

Pass { signal: clientAbort.signal } to all three fetch calls. One line change each.

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