Skip to content

fix: do not emit unlistened transport error before connect completes - #297

Merged
harsha509 merged 1 commit into
mainfrom
fix/framed-transport-early-socket-error
Aug 21, 2026
Merged

fix: do not emit unlistened transport error before connect completes#297
harsha509 merged 1 commit into
mainfrom
fix/framed-transport-early-socket-error

Conversation

@harsha509

Copy link
Copy Markdown
Collaborator

A socket error before the transport reached the connected phase emitted 'error' with no listener attached. That crashed the process with ERR_UNHANDLED_ERROR instead of rejecting connect().

The transport now suppresses the emit outside the connected phase so connect() rejects cleanly. Connected phase errors still emit as before.

Adds unit tests covering both phases.

A socket error before the transport reached the connected phase emitted
'error' with no listener attached, crashing the process with
ERR_UNHANDLED_ERROR instead of rejecting connect().
@harsha509
harsha509 merged commit 0d0e3c4 into main Aug 21, 2026
9 checks passed
@harsha509
harsha509 deleted the fix/framed-transport-early-socket-error branch August 21, 2026 11:21
github-actions Bot pushed a commit that referenced this pull request Aug 21, 2026
## [5.14.7](v5.14.6...v5.14.7) (2026-08-21)

### Bug Fixes

* do not emit unlistened transport error before connect completes ([#297](#297)) ([0d0e3c4](0d0e3c4))
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 5.14.7 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants