Commit c3bd03fc authored by Him188's avatar Him188

Improve logs

parent d8290600
......@@ -86,7 +86,7 @@ abstract class BotImpl<N : BotNetworkHandler> constructor(
if (!_network.isActive) {
return@subscribeAlways
}
bot.logger.info("Connection dropped or lost by server, retrying login")
bot.logger.info("Connection dropped by server or lost, retrying login")
tryNTimesOrException(configuration.reconnectionRetryTimes) { tryCount ->
if (tryCount != 0) {
......@@ -95,7 +95,10 @@ abstract class BotImpl<N : BotNetworkHandler> constructor(
network.relogin()
logger.info("Reconnected successfully")
return@subscribeAlways
}?.let { throw it }
}?.let {
logger.info("Cannot reconnect")
throw it
}
}
is BotOfflineEvent.Active -> {
val msg = if (event.cause == null) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment