FS-5014 --resolve

This commit is contained in:
Jeff Lenk 2013-01-11 11:12:50 -06:00
parent f913670e27
commit e9fe51124f
1 changed files with 7 additions and 0 deletions

View File

@ -2789,6 +2789,13 @@ SWITCH_MODULE_RUNTIME_FUNCTION(mod_event_socket_runtime)
rv = switch_socket_opt_set(listen_list.sock, SWITCH_SO_REUSEADDR, 1);
if (rv)
goto sock_fail;
#ifdef WIN32
/* Enable dual-stack listening on Windows (if the listening address is IPv6), it's default on Linux */
if (switch_sockaddr_get_family(sa) == AF_INET6) {
rv = switch_socket_opt_set(listen_list.sock, 16384, 0);
if (rv) goto sock_fail;
}
#endif
rv = switch_socket_bind(listen_list.sock, sa);
if (rv)
goto sock_fail;