From b682470012ef8a5e5d0e5726831965308d82d612 Mon Sep 17 00:00:00 2001 From: xqzr <34030394+xqzr@users.noreply.github.com> Date: Tue, 1 Apr 2025 01:43:04 +0800 Subject: [PATCH] ~~syscall.~~ --- transport/internet/sockopt_windows.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/transport/internet/sockopt_windows.go b/transport/internet/sockopt_windows.go index ecae807a..5c63e75b 100644 --- a/transport/internet/sockopt_windows.go +++ b/transport/internet/sockopt_windows.go @@ -72,7 +72,7 @@ func applyOutboundSocketOptions(network string, address string, fd uintptr, conf } } if config.TcpMaxSeg > 0 { - if err := syscall.SetsockoptInt(syscall.Handle(fd), syscall.IPPROTO_TCP, syscall.TCP_MAXSEG, int(config.TcpMaxSeg)); err != nil { + if err := syscall.SetsockoptInt(syscall.Handle(fd), syscall.IPPROTO_TCP, TCP_MAXSEG, int(config.TcpMaxSeg)); err != nil { return errors.New("failed to set TCP_MAXSEG", err) } } @@ -96,7 +96,7 @@ func applyInboundSocketOptions(network string, fd uintptr, config *SocketConfig) } } if config.TcpMaxSeg > 0 { - if err := syscall.SetsockoptInt(syscall.Handle(fd), syscall.IPPROTO_TCP, syscall.TCP_MAXSEG, int(config.TcpMaxSeg)); err != nil { + if err := syscall.SetsockoptInt(syscall.Handle(fd), syscall.IPPROTO_TCP, TCP_MAXSEG, int(config.TcpMaxSeg)); err != nil { return errors.New("failed to set TCP_MAXSEG", err) } }