mirror of
https://github.com/yrutschle/sslh.git
synced 2025-06-09 11:52:11 +03:00
Merge pull request #340 from utoni/fix/sslh-select
changed `select(nfds, ...)` to `select(nfds + 1, ...)`, see `man 2 select`
This commit is contained in:
commit
79c8af6ed1
@ -145,7 +145,7 @@ void main_loop(struct listen_endpoint listen_sockets[], int num_addr_listen)
|
|||||||
|
|
||||||
print_message(msg_fd, "selecting... max_fd=%d num_probing=%d\n",
|
print_message(msg_fd, "selecting... max_fd=%d num_probing=%d\n",
|
||||||
fd_info.watchers->max_fd, fd_info.num_probing);
|
fd_info.watchers->max_fd, fd_info.num_probing);
|
||||||
res = select(fd_info.watchers->max_fd, &readfds, &writefds,
|
res = select(fd_info.watchers->max_fd + 1, &readfds, &writefds,
|
||||||
NULL, fd_info.num_probing ? &tv : NULL);
|
NULL, fd_info.num_probing ? &tv : NULL);
|
||||||
if (res < 0)
|
if (res < 0)
|
||||||
perror("select");
|
perror("select");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user