protocol: use helper method
Use the `is_persistent` helper method rather than repeating the `is_some` check.
This commit is contained in:
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);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue