Merge pull request #5598 from lamby/dont-treat-unsupported-protocols-as-fatal-errors

Don't treat unsupported protocols as fatal errors
This commit is contained in:
Salvatore Sanfilippo 2018-11-28 17:06:17 +01:00 committed by GitHub
commit 1eca933d6f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1961,6 +1961,10 @@ int listenToPort(int port, int *fds, int *count) {
"Creating Server TCP listening socket %s:%d: %s",
server.bindaddr[j] ? server.bindaddr[j] : "*",
port, server.neterr);
if (errno == ENOPROTOOPT || errno == EPROTONOSUPPORT ||
errno == ESOCKTNOSUPPORT || errno == EPFNOSUPPORT ||
errno == EAFNOSUPPORT || errno == EADDRNOTAVAIL)
continue;
return C_ERR;
}
anetNonBlock(NULL,fds[*count]);