From ba3d6a67998506844df0483daaabcbf644a4473a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E6=80=9D=E6=95=8F?= Date: Tue, 30 Aug 2022 11:47:12 +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 --- netcard.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/netcard.go b/netcard.go index 2065de8..25e63e1 100644 --- a/netcard.go +++ b/netcard.go @@ -265,16 +265,15 @@ func (nc *NetCard) runWrite() { if err != nil { log.Panic(err) } + zdec.Close() - dec := gob.NewDecoder(zdec) + dec := gob.NewDecoder(buf) var bufs [][]byte err = dec.Decode(&bufs) if err != nil { log.Panic(err) } - zdec.Close() - for _, buf := range bufs { h := md5.New() h.Write(buf)