Skip to content

Commit

Permalink
修复启动插件加载bug
Browse files Browse the repository at this point in the history
  • Loading branch information
liwss committed Aug 10, 2023
1 parent 7cb83e6 commit ea687f0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions plugin/api_server/http_plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ func (*HttpPlugin) Init(config *ini.Section) error {
}

func (*HttpPlugin) Start(r typex.RuleX) error {
// 优雅退出程序
router := initialize.Routers(r)
PORT := strconv.Itoa(apiPort)
go func() {
Expand All @@ -46,6 +45,7 @@ func (*HttpPlugin) Start(r typex.RuleX) error {
fmt.Println(fmt.Sprintf("服务启动失败:%s", err.Error()))
}
}()
// 此处不能使用优雅退出方式,会导致插件的加载bug
//exit := make(chan os.Signal)
//signal.Notify(exit, syscall.SIGINT, syscall.SIGTERM)
//<-exit
Expand All @@ -63,8 +63,8 @@ func (hp *HttpPlugin) PluginMetaInfo() typex.XPluginMetaInfo {
Version: "v2.0.0",
Homepage: "https://hootrhino.github.io",
HelpLink: "https://hootrhino.github.io",
Author: "wwhai",
Email: "cnwwhai@gmail.com",
Author: "liws",
Email: "963755497@qq.com",
License: "MIT",
}
}
Expand Down

0 comments on commit ea687f0

Please sign in to comment.