Skip to content

Commit

Permalink
Merge pull request #5060 from IntersectMBO/mwojtowicz/fix-rethrow-policy
Browse files Browse the repository at this point in the history
Fix rethrow policy
  • Loading branch information
crocodile-dentist authored Feb 3, 2025
2 parents f4d05d1 + b2ba2e9 commit 2335595
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
1 change: 1 addition & 0 deletions ouroboros-network/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
* Use `LocalRootConfig` instead of a tuple.
* Extended `LocalRootConfig` with `diffusionMode :: DiffusionMode` field.
* Added `diConnStateSupply` record field to `Ouroboros.Network.Diffusion.P2P.Interfaces`.
* UnknownMiniProtocol error should not crash the node

### Non-Breaking changes

Expand Down
5 changes: 1 addition & 4 deletions ouroboros-network/src/Ouroboros/Network/Diffusion/P2P.hs
Original file line number Diff line number Diff line change
Expand Up @@ -745,11 +745,8 @@ runM Interfaces
Nothing -> mempty)
<>
RethrowPolicy (\ctx err -> case (ctx, fromException err) of
-- mux unknown mini-protocol errors on the outbound
-- side are fatal, since this is misconfiguration of the
-- ouroboros-network stack.
(OutboundError, Just Mx.UnknownMiniProtocol {})
-> ShutdownNode
-> ShutdownPeer
_ -> mempty)


Expand Down

0 comments on commit 2335595

Please sign in to comment.