Changeset: cb7f1e3c8f42 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=cb7f1e3c8f42 Modified Files: monetdb5/modules/mal/mal_mapi.c Branch: Oct2020 Log Message:
If asking for both IPv4 and IPv6, but the latter doesn't work, try the former. diffs (20 lines): diff --git a/monetdb5/modules/mal/mal_mapi.c b/monetdb5/modules/mal/mal_mapi.c --- a/monetdb5/modules/mal/mal_mapi.c +++ b/monetdb5/modules/mal/mal_mapi.c @@ -646,6 +646,16 @@ start_listen(SOCKET *sockp, int *portp, #endif closesocket(sock); sock = INVALID_SOCKET; + if (e == EADDRNOTAVAIL && ipv6_vs6only == 0 && + (strcmp(listenaddr, "::") == 0 || + strcmp(listenaddr, "::1") == 0)) { + /* IPv6 failed, maybe just IPv4 will work */ + freeaddrinfo(result); + return start_listen(sockp, portp, + strcmp(listenaddr, "::") == 0 + ? "0.0.0.0" : "127.0.0.1", + host, hostlen, maxusers); + } continue; } if (listen(sock, maxusers) == SOCKET_ERROR) { _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list