mirror of
https://github.com/librespot-org/librespot.git
synced 2024-11-08 16:45:43 +00:00
Reset session after spirc crash
This commit is contained in:
parent
e5abed7c92
commit
02c9be368d
1 changed files with 3 additions and 0 deletions
|
@ -1811,6 +1811,9 @@ async fn main() {
|
||||||
|
|
||||||
if last_credentials.is_some() && !reconnect_exceeds_rate_limit() {
|
if last_credentials.is_some() && !reconnect_exceeds_rate_limit() {
|
||||||
auto_connect_times.push(Instant::now());
|
auto_connect_times.push(Instant::now());
|
||||||
|
if !session.is_invalid() {
|
||||||
|
session.shutdown();
|
||||||
|
}
|
||||||
connecting = true;
|
connecting = true;
|
||||||
} else {
|
} else {
|
||||||
error!("Spirc shut down too often. Not reconnecting automatically.");
|
error!("Spirc shut down too often. Not reconnecting automatically.");
|
||||||
|
|
Loading…
Reference in a new issue