1
0
mirror of https://github.com/Mrs4s/go-cqhttp.git synced 2025-05-05 03:23:49 +08:00

fix reconnect

This commit is contained in:
wdvxdr 2021-01-06 12:46:10 +08:00
parent 0e5276ea4d
commit f98c334089

View File

@ -266,6 +266,8 @@ func (s *webServer) Dologin() {
log.Info("アトリは、高性能ですから!")
cli.OnDisconnected(func(bot *client.QQClient, e *client.ClientDisconnectedEvent) {
if conf.ReLogin.Enabled {
conf.ReLogin.Enabled = false
defer func() { conf.ReLogin.Enabled = true }()
var times uint = 1
for {
if cli.Online {