Skip to content

Fix connection not being detached - #154

Merged
sirn-se merged 2 commits into
v3.7-mainfrom
fix/runner-orphan-detach
Jun 15, 2026
Merged

Fix connection not being detached#154
sirn-se merged 2 commits into
v3.7-mainfrom
fix/runner-orphan-detach

Conversation

@sirn-se

@sirn-se sirn-se commented Jun 12, 2026

Copy link
Copy Markdown
Owner

When handshake failed, connection was closed but wasn't detached from the listener.

When a client connection's WebSocket handshake fails in acceptSocket(),
the Connection was attached to the Runner but never detached on failure —
only connection->disconnect() was called. This left a dead entry in the
runner that could trigger RunnerException on port reuse.

Add runner->detach() to the handshake failure catch block so the entry
is cleaned up eagerly rather than relying on lazy replacement.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@sirn-se sirn-se linked an issue Jun 12, 2026 that may be closed by this pull request
@carvefx

carvefx commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

This would make sense at least in terms of how it is described in the commit message. Meanwhile I cleaned up our onClose / onDisconnect, which reduced some other errors I've been seeing, but not the RunnerException counts.

@sirn-se
sirn-se merged commit a8edb30 into v3.7-main Jun 15, 2026
18 checks passed
@sirn-se
sirn-se deleted the fix/runner-orphan-detach branch June 15, 2026 08:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

High number of RunnerException

2 participants