diff options
| author | Fabio Alessandrelli | 2016-10-28 04:18:17 +0200 |
|---|---|---|
| committer | Fabio Alessandrelli | 2016-12-11 18:12:45 +0100 |
| commit | 70a6791150729d14ca54558f778a84af2252d3c8 (patch) | |
| tree | 42ad69322950240eb2e0d70db80ea271597801aa /drivers/unix/tcp_server_posix.cpp | |
| parent | 6e0de0cce81ee8972dc997279c2c830f7b412b4d (diff) | |
| download | godot-70a6791150729d14ca54558f778a84af2252d3c8.tar.gz godot-70a6791150729d14ca54558f778a84af2252d3c8.tar.zst godot-70a6791150729d14ca54558f778a84af2252d3c8.zip | |
Fix windows debugger connection problems.
Unify network socket creation between platform.
Ensure IPV6_V6ONLY flag is not set on sockets (allow IPv4 connection in IPv6 socket, dual-stack).
(cherry picked from commit 812908e236e83db368dfef49b8badb9a6182e1de)
Diffstat (limited to 'drivers/unix/tcp_server_posix.cpp')
| -rw-r--r-- | drivers/unix/tcp_server_posix.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/unix/tcp_server_posix.cpp b/drivers/unix/tcp_server_posix.cpp index 05b739804..32fda618b 100644 --- a/drivers/unix/tcp_server_posix.cpp +++ b/drivers/unix/tcp_server_posix.cpp @@ -71,8 +71,8 @@ void TCPServerPosix::make_default() { Error TCPServerPosix::listen(uint16_t p_port, IP_Address::AddrType p_type, const List<String> *p_accepted_hosts) { int sockfd; - int family = p_type == IP_Address::TYPE_IPV6 ? AF_INET6 : AF_INET; - sockfd = socket(family, SOCK_STREAM, 0); + sockfd = _socket_create(p_type, SOCK_STREAM, IPPROTO_TCP); + ERR_FAIL_COND_V(sockfd == -1, FAILED); #ifndef NO_FCNTL fcntl(sockfd, F_SETFL, O_NONBLOCK); |
