Skip to content

Abort signal received by worker, but the process continues. #719

@ArsenicBismuth

Description

@ArsenicBismuth

PR #573 supposedly adds aborting feature. The message is properly received by the worker as we can see in the image below, but the process continues till completion.

The sample code in the PR is also a bit wrong, as we're supposed to call the .abort() in the AbortController itself, not the signal. But nonetheless the worker received the signal properly, but no interruption is being done.

Code:

const abortController = new AbortController();
const signal = abortController.signal;

const commands = ['-i', 'input.webm', 'output.mp4'];
await ffmpeg.exec(commands, undefined, { signal }).catch(err => {
  if (err.name === "AbortError") {
    console.log(err.message) // "`Message # ID was aborted`"
  }
});

// Later on we call
abortController.abort();

image

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