diff --git a/netcard.go b/netcard.go index 2766ad8..ffa9096 100644 --- a/netcard.go +++ b/netcard.go @@ -261,14 +261,14 @@ func (nc *NetCard) runWrite() { log.Printf("get wframes bytes len: %d", len(wframe)) var buf = bytes.NewBuffer(wframe) - zdec, err := zstd.NewReader(buf) + dec := gob.NewDecoder(buf) + var bufs [][]byte + err := dec.Decode(&bufs) if err != nil { log.Panic(err) } - dec := gob.NewDecoder(buf) - var bufs [][]byte - err = dec.Decode(&bufs) + zdec, err := zstd.NewReader(buf) if err != nil { log.Panic(err) }