bug fix:并发读写map问题;add:新增Stop()函数
This commit is contained in:
parent
d58df54cd6
commit
3acc278811
@ -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
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user