Commit c9375114 authored by Him188's avatar Him188

Fix login retry

parent 4f7b266e
......@@ -94,8 +94,10 @@ abstract class BotImpl<N : BotNetworkHandler> constructor(
}
bot.logger.info("Connection dropped or lost by server, retrying login")
tryNTimesOrException(configuration.reconnectionRetryTimes) {
delay(configuration.reconnectPeriodMillis)
tryNTimesOrException(configuration.reconnectionRetryTimes) { tryCount ->
if (tryCount != 0) {
delay(configuration.reconnectPeriodMillis)
}
network.relogin()
logger.info("Reconnected successfully")
return@subscribeAlways
......
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