From b6a6d80cff356786eddeec757b3bcfe71c4c8d40 Mon Sep 17 00:00:00 2001 From: xqzr <34030394+xqzr@users.noreply.github.com> Date: Thu, 24 Jul 2025 05:18:54 +0800 Subject: [PATCH] Update packet.go --- common/singbridge/packet.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/common/singbridge/packet.go b/common/singbridge/packet.go index fef955e7..a295d572 100644 --- a/common/singbridge/packet.go +++ b/common/singbridge/packet.go @@ -37,11 +37,9 @@ func (w *PacketConnWrapper) ReadPacket(buffer *B.Buffer) (M.Socksaddr, error) { } else { buffer.Write(bb.Bytes()) w.cached = mb - var destination net.Destination + var destination net.Destination = w.Dest if bb.UDP != nil { destination = *bb.UDP - } else { - destination = w.Dest } bb.Release() return ToSocksaddr(destination), nil @@ -57,11 +55,9 @@ func (w *PacketConnWrapper) ReadPacket(buffer *B.Buffer) (M.Socksaddr, error) { } else { buffer.Write(bb.Bytes()) w.cached = nb - var destination net.Destination + var destination net.Destination = w.Dest if bb.UDP != nil { destination = *bb.UDP - } else { - destination = w.Dest } bb.Release() return ToSocksaddr(destination), nil