bug fix:并发读写map问题;add:新增Stop()函数

This commit is contained in:
兔子 2024-11-28 19:11:36 +08:00
parent d58df54cd6
commit 3acc278811

View File

@ -60,6 +60,7 @@ func NewCatchEth(eth string, sentence string) (*NetCatch, error) {
nc := new(NetCatch)
nc.eth = eth
nc.sentence = sentence
nc.ctx, nc.stopFn = context.WithCancel(context.Background())
return nc, nil
}