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)