mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-18 10:59:45 +00:00
Dont check fd against FD_SETSIZE if POLL or EPOLL are used
This commit is contained in:
1 parent
1dde754724
commit
adf124c00c
2 files changed
+2
-2
No files matched your search
+1
-1
@@ -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);
|
||||
|
||||
+1
-1
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user