mirror of
https://github.com/yhirose/cpp-httplib
synced 2024-11-21 14:29:10 -07:00
Fix select() return code for fd >= 1024 (#1757)
This commit is contained in:
parent
d948e38820
commit
af2928d316
1 changed files with 2 additions and 2 deletions
|
@ -2793,7 +2793,7 @@ inline ssize_t select_read(socket_t sock, time_t sec, time_t usec) {
|
|||
return handle_EINTR([&]() { return poll(&pfd_read, 1, timeout); });
|
||||
#else
|
||||
#ifndef _WIN32
|
||||
if (sock >= FD_SETSIZE) { return 1; }
|
||||
if (sock >= FD_SETSIZE) { return -1; }
|
||||
#endif
|
||||
|
||||
fd_set fds;
|
||||
|
@ -2821,7 +2821,7 @@ inline ssize_t select_write(socket_t sock, time_t sec, time_t usec) {
|
|||
return handle_EINTR([&]() { return poll(&pfd_read, 1, timeout); });
|
||||
#else
|
||||
#ifndef _WIN32
|
||||
if (sock >= FD_SETSIZE) { return 1; }
|
||||
if (sock >= FD_SETSIZE) { return -1; }
|
||||
#endif
|
||||
|
||||
fd_set fds;
|
||||
|
|
Loading…
Reference in a new issue