Skip to content

fix: peer actor not closing from unrecoverable io errors#220

Merged
artrixdotdev merged 1 commit into
mainfrom
fix/peer-signal-errors
Jul 1, 2026
Merged

fix: peer actor not closing from unrecoverable io errors#220
artrixdotdev merged 1 commit into
mainfrom
fix/peer-signal-errors

Conversation

@artrixdotdev

@artrixdotdev artrixdotdev commented Jul 1, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • Bug Fixes
    • Improved connection handling so message processing stops more reliably when a peer disconnects or the link is broken.
    • Added support for additional network error cases, including aborted connections, not connected, broken pipe, and other related failures.
    • Preserved existing behavior for unrelated errors.

@coderabbitai

coderabbitai Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 7dc56fbc-8b35-4c65-8051-54540a55ef48

📥 Commits

Reviewing files that changed from the base of the PR and between 6453ac0 and d4837d7.

📒 Files selected for processing (1)
  • crates/libtortillas/src/peer/actor.rs

Walkthrough

This change extends error handling in PeerActor::check_message_signal to return Signal::Stop for additional PeerActorError io/receive error kinds, beyond the previously handled UnexpectedEof and ConnectionReset.

Changes

Peer Actor Error Handling

Layer / File(s) Summary
Expanded stop signal matching
crates/libtortillas/src/peer/actor.rs
check_message_signal now returns Signal::Stop for ConnectionAborted, Other, NotConnected, and BrokenPipe error kinds, in addition to the existing UnexpectedEof and ConnectionReset cases.

Estimated code review effort: 1 (Trivial) | ~5 minutes

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/peer-signal-errors

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@artrixdotdev artrixdotdev merged commit 3effc66 into main Jul 1, 2026
2 of 3 checks passed
@artrixdotdev artrixdotdev deleted the fix/peer-signal-errors branch July 1, 2026 22:07
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.

1 participant