aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgingerBill <gingerBill@users.noreply.github.com>2023-11-07 10:47:07 +0000
committerGitHub <noreply@github.com>2023-11-07 10:47:07 +0000
commitc2e5602ee534c481a11ed4635269d9131e4f83f1 (patch)
tree89c8474862b6a30d2744ebca366482e47f0e0c50
parent8714fd77a0635eb6804c048372a346487ba9af32 (diff)
parentc20839c461bfe8986f5a7f9594fdd13a7845b24b (diff)
Merge pull request #2929 from divanburger/dial_bug_fix
Fix use of unitialized socket in socket_linux.odin#_dial_tcp_from_endpoint
-rw-r--r--core/net/socket_linux.odin2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/net/socket_linux.odin b/core/net/socket_linux.odin
index 590946dff..539317141 100644
--- a/core/net/socket_linux.odin
+++ b/core/net/socket_linux.odin
@@ -143,7 +143,7 @@ _dial_tcp_from_endpoint :: proc(endpoint: Endpoint, options := default_tcp_optio
reuse_addr: b32 = true
_ = linux.setsockopt(os_sock, linux.SOL_SOCKET, linux.Socket_Option.REUSEADDR, &reuse_addr)
addr := _unwrap_os_addr(endpoint)
- errno = linux.connect(linux.Fd(tcp_sock), &addr)
+ errno = linux.connect(linux.Fd(os_sock), &addr)
if errno != .NONE {
return cast(TCP_Socket) os_sock, Dial_Error(errno)
}