Use the anet-reported error string when reporting bind errors.

errno may have been modified by the time you see it.
This commit is contained in:
Oliver Jowett 2014-10-01 12:37:29 +01:00
parent c09c68466c
commit 186cac5c25

View file

@ -88,7 +88,7 @@ void modesInitNet(void) {
int s = anetTcpServer(Modes.aneterr, services[j].port, NULL); int s = anetTcpServer(Modes.aneterr, services[j].port, NULL);
if (s == -1) { if (s == -1) {
fprintf(stderr, "Error opening the listening port %d (%s): %s\n", fprintf(stderr, "Error opening the listening port %d (%s): %s\n",
services[j].port, services[j].descr, strerror(errno)); services[j].port, services[j].descr, Modes.aneterr);
exit(1); exit(1);
} }
anetNonBlock(Modes.aneterr, s); anetNonBlock(Modes.aneterr, s);