diff --git a/src/main.rs b/src/main.rs index 8054a236..1467c177 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1811,6 +1811,9 @@ async fn main() { if last_credentials.is_some() && !reconnect_exceeds_rate_limit() { auto_connect_times.push(Instant::now()); + if !session.is_invalid() { + session.shutdown(); + } connecting = true; } else { error!("Spirc shut down too often. Not reconnecting automatically.");