1
0
mirror of https://github.com/Mrs4s/go-cqhttp.git synced 2025-05-07 20:45:53 +08:00
This commit is contained in:
Mrs4s 2020-12-04 09:39:53 +08:00
parent cc6c042516
commit 14278190e3

View File

@ -76,15 +76,14 @@ func (s *webServer) Run(addr string, cli *client.QQClient) *coolq.CQBot {
//通用路由
s.engine.Any("/admin/:action", s.admin)
if Debug {
pprof.Register(s.engine)
log.Debugf("pprof 性能分析服务已启动在 http://%v/debug/pprof, 如果有任何性能问题请下载报告并提交给开发者", addr)
time.Sleep(time.Second * 3)
}
go func() {
//开启端口监听
if s.Conf.WebUi != nil && s.Conf.WebUi.Enabled {
if Debug {
pprof.Register(s.engine)
log.Debugf("pprof 性能分析服务已启动在 http://%v/debug/pprof, 如果有任何性能问题请下载报告并提交给开发者", addr)
time.Sleep(time.Second * 3)
}
log.Infof("Admin API 服务器已启动: %v", addr)
err := s.engine.Run(addr)
if err != nil {