Skip to content

Commit 7f78199

Browse files
committed
internal/socket: replace deprecated syscall.Syscall9
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
1 parent 392fe1b commit 7f78199

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

internal/socket/socket.go

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -156,18 +156,14 @@ func connectEx(
156156
bytesSent *uint32,
157157
overlapped *windows.Overlapped,
158158
) (err error) {
159-
// todo: after upgrading to 1.18, switch from syscall.Syscall9 to syscall.SyscallN
160-
r1, _, e1 := syscall.Syscall9(connectExFunc.addr,
161-
7,
159+
r1, _, e1 := syscall.SyscallN(connectExFunc.addr,
162160
uintptr(s),
163161
uintptr(name),
164162
uintptr(namelen),
165163
uintptr(unsafe.Pointer(sendBuf)),
166164
uintptr(sendDataLen),
167165
uintptr(unsafe.Pointer(bytesSent)),
168-
uintptr(unsafe.Pointer(overlapped)),
169-
0,
170-
0)
166+
uintptr(unsafe.Pointer(overlapped)))
171167
if r1 == 0 {
172168
if e1 != 0 {
173169
err = error(e1)

0 commit comments

Comments
 (0)