mirror of
https://github.com/aljazceru/notedeck.git
synced 2025-12-19 09:34:19 +01:00
fixed reconnect duration
Changelog-Fixes: Fix long delays when reconnecting
This commit is contained in:
@@ -237,9 +237,7 @@ impl RelayPool {
|
|||||||
relay.last_connect_attempt + relay.retry_connect_after;
|
relay.last_connect_attempt + relay.retry_connect_after;
|
||||||
if now > reconnect_at {
|
if now > reconnect_at {
|
||||||
relay.last_connect_attempt = now;
|
relay.last_connect_attempt = now;
|
||||||
let next_duration = Duration::from_millis(
|
let next_duration = Duration::from_millis(3000);
|
||||||
((relay.retry_connect_after.as_millis() as f64) * 1.5) as u64,
|
|
||||||
);
|
|
||||||
debug!(
|
debug!(
|
||||||
"bumping reconnect duration from {:?} to {:?} and retrying connect",
|
"bumping reconnect duration from {:?} to {:?} and retrying connect",
|
||||||
relay.retry_connect_after, next_duration
|
relay.retry_connect_after, next_duration
|
||||||
|
|||||||
Reference in New Issue
Block a user