Skip to content

Awaiting onDone() too late causes execution to hang #14

Description

@legraphista

Due to how onDone has been implemented, calling it after the process is finished will result in a hanged promise:

const { code, signal } = await new Promise<{ code: number, signal: string }>((res) => {
this.once('end', (code: number, signal: string) => {
return res({ code, signal })
})
});

The issue stems from the fact that once the sub-process has ended, the end event will not fire again, thus locking the promise in an unresolvable state

Activity

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

Metadata

Metadata

Assignees

Labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions