In debug mode log when accept fails.
This commit is contained in:
parent
4c16e14e41
commit
fccf6e2e9e
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user