fix: missing edits

This commit is contained in:
源文雨
2025-02-25 22:50:55 +09:00
parent 2c5bfa5c2d
commit 597fa8d048
2 changed files with 2 additions and 2 deletions

View File

@@ -202,7 +202,7 @@ func (m *Me) dispatch(packet *orbyte.Item[head.Packet], addr p2p.EndPoint, index
if config.ShowDebugLog {
logrus.Debugln("[listen] @", index, "zstd decoded len:", w.Len())
}
pp.SetBody(w.TransBytes())
pp.SetBody(w.TransBytes().Bytes())
}
if !pp.IsVaildHash() {
if config.ShowDebugLog {

View File

@@ -104,7 +104,7 @@ func (l *Link) encrypt(p *head.Packet, sndcnt uint16, teatype uint8) {
enc, _ := zstd.NewWriter(w, zstd.WithEncoderLevel(zstd.SpeedFastest))
_, _ = io.Copy(enc, bytes.NewReader(data))
enc.Close()
data = w.TransBytes()
data = w.TransBytes().Bytes()
if config.ShowDebugLog {
logrus.Debugln("[send] data len after zstd:", len(data))
}