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 18:55:35 +01:00
committed by Lorenz Leutgeb
parent 73f9a35033
commit 36d5a4c8b0
+1 -1
View File
@@ -1435,7 +1435,7 @@ where
});
// 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))
.clamp(MIN_RECONNECTION_DELTA, MAX_RECONNECTION_DELTA);