From 02c9be368da7460379ab22421ee28a4d259e398b Mon Sep 17 00:00:00 2001 From: Jarkko Lehtoranta Date: Tue, 13 Jun 2023 18:00:28 +0300 Subject: [PATCH] Reset session after spirc crash --- src/main.rs | 3 +++ 1 file changed, 3 insertions(+) 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.");