Exit with an error when the player instance is invalid

This commit is contained in:
Jarkko Lehtoranta 2023-06-13 17:57:32 +03:00
parent e3db0994bc
commit e5abed7c92
No known key found for this signature in database
GPG key ID: E539048C587D1F09

View file

@ -1817,6 +1817,10 @@ async fn main() {
exit(1); exit(1);
} }
}, },
_ = async {}, if player.is_invalid() => {
error!("Player shut down unexpectedly");
exit(1);
},
_ = tokio::signal::ctrl_c() => { _ = tokio::signal::ctrl_c() => {
break; break;
}, },