fix: 修复 tcp、udp、uds 等类型服务器数据包会额外增加一个长度的问题

This commit is contained in:
kercylan98 2023-08-24 12:13:13 +08:00
parent 3fc282afab
commit 124635c72c
1 changed files with 1 additions and 1 deletions

View File

@ -39,7 +39,7 @@ func (slf *gNet) AfterWrite(c gnet.Conn, b []byte) {
}
func (slf *gNet) React(packet []byte, c gnet.Conn) (out []byte, action gnet.Action) {
PushPacketMessage(slf.Server, c.Context().(*Conn), 0, append(bytes.Clone(packet), 0))
PushPacketMessage(slf.Server, c.Context().(*Conn), 0, bytes.Clone(packet))
return nil, gnet.None
}