In debug mode log when accept fails.

This commit is contained in:
antirez 2013-12-15 22:04:02 +01:00
parent 4c16e14e41
commit fccf6e2e9e

View File

@ -1936,7 +1936,12 @@ void modesAcceptClients(void) {
for (j = 0; j < MODES_NET_SERVICES_NUM; j++) { for (j = 0; j < MODES_NET_SERVICES_NUM; j++) {
fd = anetTcpAccept(Modes.aneterr, *modesNetServices[j].socket, fd = anetTcpAccept(Modes.aneterr, *modesNetServices[j].socket,
NULL, &port); NULL, &port);
if (fd == -1) continue; if (fd == -1) {
if (Modes.debug & MODES_DEBUG_NET && errno != EAGAIN)
printf("Accept %d: %s\n", *modesNetServices[j].socket,
strerror(errno));
continue;
}
if (fd >= MODES_NET_MAX_FD) { if (fd >= MODES_NET_MAX_FD) {
close(fd); close(fd);