Merge pull request #2973 from flysand7/dial_tcp_bug

[net]: Fix passing the wrong socket to `linux.connect` on linux
This commit is contained in:
Jeroen van Rijn
2023-11-25 10:39:14 +01:00
committed by GitHub

View File

@@ -125,7 +125,7 @@ _create_socket :: proc(family: Address_Family, protocol: Socket_Protocol) -> (An
}
@(private)
_dial_tcp_from_endpoint :: proc(endpoint: Endpoint, options := default_tcp_options) -> (tcp_sock: TCP_Socket, err: Network_Error) {
_dial_tcp_from_endpoint :: proc(endpoint: Endpoint, options := default_tcp_options) -> (TCP_Socket, Network_Error) {
errno: linux.Errno
if endpoint.port == 0 {
return 0, .Port_Required