protocol: use helper method

Use the `is_persistent` helper method rather than repeating the
`is_some` check.
This commit is contained in:
Fintan Halpenny 2026-01-26 14:40:32 +00:00 committed by Lorenz Leutgeb
parent 73f9a35033
commit 36d5a4c8b0
1 changed files with 1 additions and 1 deletions

View File

@ -1435,7 +1435,7 @@ where
}); });
// Attempt to re-connect to persistent peers. // Attempt to re-connect to persistent peers.
if self.config.peer(&remote).is_some() { if self.config.is_persistent(&remote) {
let delay = LocalDuration::from_secs(2u64.saturating_pow(session.attempts() as u32)) let delay = LocalDuration::from_secs(2u64.saturating_pow(session.attempts() as u32))
.clamp(MIN_RECONNECTION_DELTA, MAX_RECONNECTION_DELTA); .clamp(MIN_RECONNECTION_DELTA, MAX_RECONNECTION_DELTA);