1
0
mirror of https://github.com/mpv-player/mpv synced 2025-03-06 14:17:46 +00:00

Make sure we do not try to use IPv6 with winsock2, we end up connecting

to random addresses, causing huge delays.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30661 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
reimar 2010-02-20 11:13:01 +00:00
parent 7afaac3a1f
commit 74b5e8b68a

View File

@ -99,6 +99,14 @@ connect2Server_with_af(char *host, int port, int af,int verb) {
struct timeval to;
#endif
#if HAVE_WINSOCK2_H && defined(HAVE_AF_INET6)
// our winsock name resolution code can not handle IPv6
if (af == AF_INET6) {
mp_msg(MSGT_NETWORK, MSGL_WARN, "IPv6 not supported for winsock2\n");
return TCP_ERROR_FATAL;
}
#endif
socket_server_fd = socket(af, SOCK_STREAM, 0);