Skip to content

fix: BusTui.connect() reconnect loop leak + ISSUES.md cleanup (post-PR#16) #19

@four-bytes-robby

Description

@four-bytes-robby

From PR #16 bot reviews

P2: reconnect loop leak (src/bus-tui.ts:46)

cubic-dev-ai flagged: connect() creates a BusTui instance, calls open() which registers onclose → scheduleReconnect(). If open() throws, the catch block throws without calling bus.close(). The WebSocket onclose can still fire, triggering an infinite reconnect loop on the leaked instance.

Fix: Add bus.close() in the catch block before re-throwing.

P3: ISSUES.md lifecycle patterns table outdated

Both coderabbitai and cubic-dev-ai flagged: Lines 128-129 mark Issues #1 and #3 as "❌ missing" but:

Fix: Update table rows, mark both as ✅ done.

Minor: Code example mismatch (ISSUES.md:95-109)

The code example shows the old scheduleReconnect() return pattern. The actual fix (commit ccde741) makes connect() throw on failure instead.

Fix: Update or remove the outdated code example.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions