From 1b33e66799e0f5313df4949f3a5ae75cefa8ff37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E6=80=9D=E6=95=8F?= Date: Fri, 26 Aug 2022 10:25:57 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- device.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/device.go b/device.go index 0b6448e..56778a3 100644 --- a/device.go +++ b/device.go @@ -237,7 +237,6 @@ func (nc *NetCard) runWrite() { for wframe := range nc.FrameChan { log.Printf("get wframes bytes len: %d", len(wframe)) - buf.Reset() buf.Write(wframe) @@ -254,6 +253,8 @@ func (nc *NetCard) runWrite() { log.Panic(err) } + zdec.Close() + for _, buf := range bufs { _, err := ifce.Write(buf) if err != nil {