File tree Expand file tree Collapse file tree 3 files changed +5
-8
lines changed Expand file tree Collapse file tree 3 files changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -102,11 +102,9 @@ func (e *Engine) DoEvent(ed *models.EventData) {
102
102
103
103
func (x1 * Engine ) Running () {
104
104
// 异步启动一个线程处理检测,避免
105
- util .Wg .Add (1 )
106
105
go func () {
107
106
defer func () {
108
107
x1 .Close ()
109
- util .Wg .Done ()
110
108
}()
111
109
//nMax := 120 // 等xxx秒都没有消息进入就退出
112
110
//nCnt := 0
Original file line number Diff line number Diff line change 6
6
"embed"
7
7
"encoding/json"
8
8
"fmt"
9
- "github.com/fsnotify/fsnotify"
10
9
"github.com/karlseguin/ccache"
11
10
"github.com/spf13/viper"
12
11
"io/fs"
@@ -227,12 +226,12 @@ func LoadCoinfig(config *viper.Viper) {
227
226
return
228
227
}
229
228
config .Unmarshal (& mData )
230
- config .OnConfigChange (func (e fsnotify.Event ) {
231
- log .Println ("Config file changed, now reLoad it: " , e .Name )
232
- LoadCoinfig (config )
233
- })
229
+ // config.OnConfigChange(func(e fsnotify.Event) {
230
+ // log.Println("Config file changed, now reLoad it: ", e.Name)
231
+ // LoadCoinfig(config)
232
+ // })
234
233
// 避免 hold
235
- go config .WatchConfig ()
234
+ // go config.WatchConfig()
236
235
}
237
236
238
237
// 初始化配置文件信息,这个必须先执行
You can’t perform that action at this time.
0 commit comments