fix: add an unmap before is6

This commit is contained in:
wwqgtxx
2022-12-11 15:48:37 +08:00
parent 57dfaf135d
commit f657ac97f6
2 changed files with 2 additions and 2 deletions

View File

@ -334,7 +334,7 @@ type hyDialerWithContext struct {
func (h *hyDialerWithContext) ListenPacket(rAddr net.Addr) (net.PacketConn, error) {
network := "udp"
if addrPort, err := netip.ParseAddrPort(rAddr.String()); err == nil {
if addrPort.Addr().Is6() {
if addrPort.Addr().Unmap().Is6() {
network = "udp6"
}
}