测试
This commit is contained in:
parent
8042a498fe
commit
10c5e7779d
|
@ -79,14 +79,17 @@ func (cli *RPCClient) run() {
|
||||||
// encode gob
|
// encode gob
|
||||||
enc := gob.NewEncoder(buf)
|
enc := gob.NewEncoder(buf)
|
||||||
cliBuffer := <-cli.FrameChan
|
cliBuffer := <-cli.FrameChan
|
||||||
enc.Encode(cliBuffer.BytesArray)
|
err := enc.Encode(cliBuffer.BytesArray)
|
||||||
|
if err != nil {
|
||||||
|
log.Panic(err)
|
||||||
|
}
|
||||||
|
|
||||||
// zstd compress
|
// zstd compress
|
||||||
zenc, err := zstd.NewWriter(buf)
|
zenc, err := zstd.NewWriter(buf)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Panic(err)
|
log.Panic(err)
|
||||||
}
|
}
|
||||||
err = zenc.Close()
|
err = zenc.Flush()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Println(err)
|
log.Println(err)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user