From 3acc27881101696f8a965d43bb60845cdc1ef507 Mon Sep 17 00:00:00 2001 From: starainrt Date: Thu, 28 Nov 2024 19:11:36 +0800 Subject: [PATCH] =?UTF-8?q?bug=20fix:=E5=B9=B6=E5=8F=91=E8=AF=BB=E5=86=99m?= =?UTF-8?q?ap=E9=97=AE=E9=A2=98;add:=E6=96=B0=E5=A2=9EStop()=E5=87=BD?= =?UTF-8?q?=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- libpcap/libpcap.go | 1 + 1 file changed, 1 insertion(+) diff --git a/libpcap/libpcap.go b/libpcap/libpcap.go index 5f631d1..544f036 100644 --- a/libpcap/libpcap.go +++ b/libpcap/libpcap.go @@ -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 }