Repository navigation
fix(core): explain stale-peer and no-network errors instead of raw socket codes - #432
Merged
Merged
Conversation
…cket codes A peer that exits or restarts leaves a stale address behind, and the dials and sends to it reached the pi UI as bare ECONNREFUSED or ECONNRESET messages, one per attempt. Likewise a host with no network route raised ENETUNREACH on every first-contact beacon. Dial and send failures are now a PeerLinkError that names the peer and keeps the transport's errno. describeMeshError turns the known conditions into a sentence saying what happened, what it most likely means and whether anything needs doing, and the reporter writes each recognised condition once instead of once per attempt. The pi bridge uses the shared reporter. Refs #427
Contributor
|
🎉 This PR is included in version 8.14.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Dials and sends to a peer that has exited or restarted reached the pi UI as bare
connect ECONNREFUSED/read ECONNRESET/disconnected before a response arrivedlines, one per attempt, and a host with no network route raisedsend ENETUNREACH 255.255.255.255:19877on every beacon. None of them said what was wrong or whether to act.Dial and send failures are now a
PeerLinkErrorthat names the peer and keeps the transport's errno.describeMeshErrorturns the known conditions (stale peer address, dropped send, no network) into a sentence saying what happened and what it most likely means, andcreateMeshErrorReporterwrites each recognised condition once per reporter instead of once per attempt. The pi extension now uses the shared reporter rather than formatting each error itself. Unrecognised errors are written as before, every time.Refs #427. It closes once a release carrying this has reached the reporter.