Skip to content

RHP4: defer recover #259

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 9, 2025
Merged

RHP4: defer recover #259

merged 1 commit into from
Jun 9, 2025

Conversation

n8maninger
Copy link
Member

No description provided.

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a deferred recover block in the host stream handler to catch and log any panics, thereby preventing nodes from crashing.

  • Added a defer recover block with error logging in server.go
  • Introduced a changeset markdown file to document the update

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
rhp/v4/server.go Added a deferred recover block in handleHostStream to catch panics and log errors
.changeset/added_defer_recover_to_prevent_nodes_from_panicking_due_to_uncaught_bugs.md Documented the update to add panic recovery in nodes
Comments suppressed due to low confidence (1)

rhp/v4/server.go:1128

  • Consider adding a comment explaining the decision to recover from panics here, so future maintainers understand the rationale behind silently catching these errors.
defer func() {

@github-project-automation github-project-automation bot moved this to In Progress in Sia Jun 9, 2025
@n8maninger n8maninger requested a review from peterjan June 9, 2025 16:12
@n8maninger n8maninger merged commit 1c43565 into master Jun 9, 2025
12 checks passed
@n8maninger n8maninger deleted the nate/rhp-recover branch June 9, 2025 17:00
@github-project-automation github-project-automation bot moved this from In Progress to Done in Sia Jun 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants