Skip to content

sql.end() during a subscribe reconnect is an unhandled rejection #33

Closed

Description

@okomarov

If sql.end() runs while a sql.subscribe() replication connection is reconnecting, init() rejects with CONNECTION_ENDED inside the async onclose in src/subscribe.js, and nothing handles the rejection: an unhandled rejection, which ends the process under Node's default handling.

Found while planning #24. Fix: catch in the reconnect path when the subscription has ended, and report other failures through the subscribers' onerror (see #24).

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

    area: listen-subscribebug

    Type

    No type

    Projects

    • Status
      Shipped

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions