Commit f5f3a314 authored by 千橘雫霞's avatar 千橘雫霞

修复机器人已登录但继续尝试登录的缺陷

parent 83ce4e58
......@@ -303,10 +303,14 @@ func main() {
var times uint = 1
for {
if conf.ReLogin.MaxReloginTimes == 0 {
} else if times > conf.ReLogin.MaxReloginTimes {
if cli.Online {
log.Warn("Bot已登录")
return
}
if conf.ReLogin.MaxReloginTimes != 0 && times > conf.ReLogin.MaxReloginTimes {
break
}
log.Warnf("Bot已离线 (%v),将在 %v 秒后尝试重连. 重连次数:%v",
e.Message, conf.ReLogin.ReLoginDelay, times)
times++
......
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