Skip to content

Commit

Permalink
feat: propagate handshake error (#6530)
Browse files Browse the repository at this point in the history
Description
---
Propagate handshake error to next process. This was omitted in #6528.

Motivation and Context
---
See above.

How Has This Been Tested?
---
System-level testing.

What process can a PR reviewer use to test or verify this change?
---
Code review.

<!-- Checklist -->
<!-- 1. Is the title of your PR in the form that would make nice release
notes? The title, excluding the conventional commit
tag, will be included exactly as is in the CHANGELOG, so please think
about it carefully. -->


Breaking Changes
---

- [x] None
- [ ] Requires data directory on base node to be deleted
- [ ] Requires hard fork
- [ ] Other - Please specify

<!-- Does this include a breaking change? If so, include this line as a
footer -->
<!-- BREAKING CHANGE: Description what the user should do, e.g. delete a
database, resync the chain -->
  • Loading branch information
hansieodendaal authored Sep 5, 2024
1 parent b5f5e03 commit e29c909
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions comms/core/src/connection_manager/dialer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -662,6 +662,11 @@ where
.peer_mut()
.addresses
.mark_failed_connection_attempt(&address, err.to_string());

// Handshake errors are not retryable
if let ConnectionManagerError::NoiseHandshakeError(msg) = err {
return (dial_state, Err(ConnectionManagerError::NoiseHandshakeError(msg)));
}
// Try the next address
continue;
},
Expand Down

0 comments on commit e29c909

Please sign in to comment.