Skip to content

MIDParser silently errors because _destroy() is a no-op #33

@ferm10n

Description

@ferm10n

I'm discovering that if there's an error during parsing, MidParser does not emit it, and the stream is silently destroyed. This might be caused by something I did while tinkering with the project, but it'd really help if I had some context about this section:

_destroy() {
//no-op, needed to handle older node versions
}

It seems to be responsible for why the error gets eaten. If I remove it, the default handler emits the error event correctly.

How did earlier versions of node behave that prompted _destroy() to become a noop? I'd like to fix this without breaking backwards compat, but can't do that without more history on why it was added.

(I'm using node v14 btw)

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