Fixed main returning prematurely if there is an errror in the message loop

This commit is contained in:
famfo 2021-12-28 13:52:22 +01:00
parent 74cb49edfa
commit 8d33f44988

View file

@ -91,7 +91,9 @@ async fn main() -> anyhow::Result<()> {
titlebot: Titlebot::create(spotify_creds).await?,
};
message_loop(state).await?;
if let Err(e) = message_loop(state).await {
error!("Error in message loop: {}", e);
}
info!("Shutting down");