1
0
mirror of https://github.com/Mrs4s/go-cqhttp.git synced 2025-05-06 12:03:50 +08:00
修复当无法连接WS时未初始化EventFilter的bug
This commit is contained in:
wdvxdr 2020-09-10 20:56:38 +08:00
parent faba3e042f
commit 0cfaa4c7ad

View File

@ -266,6 +266,8 @@ func main() {
if conf.RateLimit.Enabled {
global.InitLimiter(conf.RateLimit.Frequency, conf.RateLimit.BucketSize)
}
log.Info("正在加载事件过滤器.")
global.BootFilter()
coolq.IgnoreInvalidCQCode = conf.IgnoreInvalidCQCode
coolq.ForceFragmented = conf.ForceFragmented
if conf.HttpConfig != nil && conf.HttpConfig.Enabled {
@ -280,8 +282,6 @@ func main() {
for _, rc := range conf.ReverseServers {
server.NewWebsocketClient(rc, conf.AccessToken, b).Run()
}
log.Info("正在加载事件过滤器.")
global.BootFilter()
log.Info("资源初始化完成, 开始处理信息.")
log.Info("アトリは、高性能ですから!")
cli.OnDisconnected(func(bot *client.QQClient, e *client.ClientDisconnectedEvent) {