Skip to content

Commit

Permalink
internal/socket: replace deprecated syscall.Syscall9
Browse files Browse the repository at this point in the history
Signed-off-by: Sebastiaan van Stijn <[email protected]>
  • Loading branch information
thaJeztah committed Apr 8, 2023
1 parent 392fe1b commit 7f78199
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions internal/socket/socket.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,18 +156,14 @@ func connectEx(
bytesSent *uint32,
overlapped *windows.Overlapped,
) (err error) {
// todo: after upgrading to 1.18, switch from syscall.Syscall9 to syscall.SyscallN
r1, _, e1 := syscall.Syscall9(connectExFunc.addr,
7,
r1, _, e1 := syscall.SyscallN(connectExFunc.addr,
uintptr(s),
uintptr(name),
uintptr(namelen),
uintptr(unsafe.Pointer(sendBuf)),
uintptr(sendDataLen),
uintptr(unsafe.Pointer(bytesSent)),
uintptr(unsafe.Pointer(overlapped)),
0,
0)
uintptr(unsafe.Pointer(overlapped)))
if r1 == 0 {
if e1 != 0 {
err = error(e1)
Expand Down

0 comments on commit 7f78199

Please sign in to comment.