mirror of
https://github.com/mamoe/mirai.git
synced 2025-02-15 04:50:11 +08:00
Improve logs on reconnection
This commit is contained in:
parent
708e77bcfa
commit
ff9cc6a74e
@ -142,7 +142,9 @@ internal abstract class AbstractBot<N : BotNetworkHandler> constructor(
|
|||||||
// normally closed
|
// normally closed
|
||||||
return@subscribeAlways
|
return@subscribeAlways
|
||||||
}
|
}
|
||||||
bot.logger.info { "Connection lost, retrying login" }
|
|
||||||
|
val causeMessage = event.castOrNull<BotOfflineEvent.CauseAware>()?.cause?.toString() ?: event.toString()
|
||||||
|
bot.logger.info { "Connection lost, retrying login ($causeMessage)" }
|
||||||
|
|
||||||
bot.asQQAndroidBot().client.run {
|
bot.asQQAndroidBot().client.run {
|
||||||
if (serverList.isEmpty()) {
|
if (serverList.isEmpty()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user