Skip to content

Commit 9bb1ee7

Browse files
syscall->unix
1 parent 5197832 commit 9bb1ee7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

gohpts.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -649,10 +649,10 @@ func newTproxyServer(pa *proxyapp) *tproxyServer {
649649
Control: func(network, address string, conn syscall.RawConn) error {
650650
var operr error
651651
if err := conn.Control(func(fd uintptr) {
652-
operr = syscall.SetsockoptInt(int(fd), unix.IPPROTO_TCP, unix.TCP_USER_TIMEOUT, int(timeout*1000))
653-
operr = syscall.SetsockoptInt(int(fd), unix.SOL_SOCKET, unix.SO_REUSEADDR, 1)
652+
operr = unix.SetsockoptInt(int(fd), unix.IPPROTO_TCP, unix.TCP_USER_TIMEOUT, int(timeout*1000))
653+
operr = unix.SetsockoptInt(int(fd), unix.SOL_SOCKET, unix.SO_REUSEADDR, 1)
654654
if ts.pa.tproxyMode == "tproxy" {
655-
operr = syscall.SetsockoptInt(int(fd), unix.SOL_IP, unix.IP_TRANSPARENT, 1)
655+
operr = unix.SetsockoptInt(int(fd), unix.SOL_IP, unix.IP_TRANSPARENT, 1)
656656
}
657657
}); err != nil {
658658
return err

0 commit comments

Comments
 (0)