Skip to content

relay: a close that stop() retries successfully lets the host record be cleared #828

Closed

Description

@tps-flint

Found by the 2026-11-07 post-merge audit of #794 and verified against main 709c161 (LOW: fails safe today because real transports do not reject a close; becomes reachable once #774 lands).

What the fix does: the relay's "unconfirmed close" flag is set only when a channel is dropped from the retained set without being closed. A retained channel that stop() then closes successfully on retry no longer marks the stop as unconfirmed, so the host record is cleared and stop() does not report a disconnect failure — whether the original rejection arrived before stop() started or while it was waiting on that close. The existing case "stop() waits for a pending reconnect close that rejects" in relay-failed-channels-refresh-783.test.ts currently expects the failure despite a successful retry; its expectation changes with the fix, and a new case covers both orderings on both close paths.

Note: open PR #819 moves the same assignment into its new close helper; build this after #819 merges.

Refs #791, #794, #774

Activity

  1. moved this to Triage in Office queueon Nov 7, 2026
  2. self-assigned this
    on Nov 9, 2026
  3. moved this from Triage to In review in Office queueon Nov 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions