1
0
mirror of https://github.com/Mrs4s/go-cqhttp.git synced 2025-06-19 22:15:04 +08:00

Merge pull request #541 from wdvxdr1123/patch-2

fix reconnect
This commit is contained in:
Mrs4s 2021-01-06 21:00:21 +08:00 committed by GitHub
commit 416a3460ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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