From bf02392969076e1a5422f95ee1993764cbcd0d74 Mon Sep 17 00:00:00 2001 From: yuhan6665 <1588741+yuhan6665@users.noreply.github.com> Date: Sat, 17 Feb 2024 13:22:39 -0500 Subject: [PATCH] Temporarily turn off sockopt for UDP on windows --- transport/internet/system_dialer.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/transport/internet/system_dialer.go b/transport/internet/system_dialer.go index 2c2fdf85..924f364c 100644 --- a/transport/internet/system_dialer.go +++ b/transport/internet/system_dialer.go @@ -2,6 +2,7 @@ package internet import ( "context" + "runtime" "syscall" "time" @@ -66,7 +67,7 @@ func (d *DefaultSystemDialer) Dial(ctx context.Context, src net.Address, dest ne if err != nil { return nil, err } - if sockopt != nil || len(d.controllers) > 0 { + if runtime.GOOS != "windows" && (sockopt != nil || len(d.controllers) > 0) { file, err := packetConn.(*net.UDPConn).File() if err != nil { return nil, err