Skip to content

sql.subscribe() after a reconnect binds to the dead stream and end() hangs #32

Closed

Description

@okomarov

subscribe() calls connected(x) with the result of the first init(): the connection promise is set once and never updated when onclose reconnects. A sql.subscribe() made after a reconnect therefore sets stream back to the destroyed first stream, and sql.end() then hangs (it waits for that stream's close).

Found while planning #24 (verified: end hung after 3 s). Likely fix: keep connection pointing at the latest init() (assign it in the reconnect), with a test that also covers an init() that rejects.

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