mirror of
https://github.com/cesanta/mongoose.git
synced 2025-01-19 08:03:14 +08:00
Dont check fd against FD_SETSIZE if POLL or EPOLL are used
This commit is contained in:
parent
1dde754724
commit
adf124c00c
@ -4762,7 +4762,7 @@ static void accept_conn(struct mg_mgr *mgr, struct mg_connection *lsn) {
|
||||
#endif
|
||||
MG_ERROR(("%lu accept failed, errno %d", lsn->id, MG_SOCK_ERR(-1)));
|
||||
#if (MG_ARCH != MG_ARCH_WIN32) && !MG_ENABLE_FREERTOS_TCP && \
|
||||
(MG_ARCH != MG_ARCH_TIRTOS) && !MG_ENABLE_POLL
|
||||
(MG_ARCH != MG_ARCH_TIRTOS) && !MG_ENABLE_POLL && MG_ENABLE_EPOLL
|
||||
} else if ((long) fd >= FD_SETSIZE) {
|
||||
MG_ERROR(("%ld > %ld", (long) fd, (long) FD_SETSIZE));
|
||||
closesocket(fd);
|
||||
|
@ -388,7 +388,7 @@ static void accept_conn(struct mg_mgr *mgr, struct mg_connection *lsn) {
|
||||
#endif
|
||||
MG_ERROR(("%lu accept failed, errno %d", lsn->id, MG_SOCK_ERR(-1)));
|
||||
#if (MG_ARCH != MG_ARCH_WIN32) && !MG_ENABLE_FREERTOS_TCP && \
|
||||
(MG_ARCH != MG_ARCH_TIRTOS) && !MG_ENABLE_POLL
|
||||
(MG_ARCH != MG_ARCH_TIRTOS) && !MG_ENABLE_POLL && MG_ENABLE_EPOLL
|
||||
} else if ((long) fd >= FD_SETSIZE) {
|
||||
MG_ERROR(("%ld > %ld", (long) fd, (long) FD_SETSIZE));
|
||||
closesocket(fd);
|
||||
|
Loading…
Reference in New Issue
Block a user