Skip to content

Commit

Permalink
[console] Fix exception not caught when closing bot while auto login; f…
Browse files Browse the repository at this point in the history
…ix #2740
  • Loading branch information
Karlatemp committed Jul 25, 2023
1 parent 61e8501 commit 7859767
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,13 @@ ___ ____ _ _____ _
}
}.onFailure {
mainLogger.error(it)
bot.close()

runCatching {
bot.close()
}.onFailure { err ->
mainLogger.error("Error in closing bot", err)
}

launch {
AutoLoginEvent.Failure(bot = bot, cause = it).broadcast()
}
Expand Down

0 comments on commit 7859767

Please sign in to comment.