mirror of
https://seed.radicle.dev/rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5.git
synced 2026-11-29 14:00:31 +08:00
protocol: use helper method
Use the `is_persistent` helper method rather than repeating the `is_some` check.
This commit is contained in:
committed by
Lorenz Leutgeb
parent
73f9a35033
commit
36d5a4c8b0
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user