mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Fix check for max_fd == -1 should actually be max_fd != -1
This commit is contained in:
parent
9edb91da57
commit
3bbd280336
1 changed files with 1 additions and 1 deletions
|
@ -548,7 +548,7 @@ protected:
|
||||||
if (select_timeout > 0) {
|
if (select_timeout > 0) {
|
||||||
// in Winsock it is forbidden to pass three empty
|
// in Winsock it is forbidden to pass three empty
|
||||||
// fd_sets to select(), so in that case use sleep_ms
|
// fd_sets to select(), so in that case use sleep_ms
|
||||||
if (max_fd == -1) {
|
if (max_fd != -1) {
|
||||||
select_tv.tv_sec = select_timeout / 1000;
|
select_tv.tv_sec = select_timeout / 1000;
|
||||||
select_tv.tv_usec = (select_timeout % 1000) * 1000;
|
select_tv.tv_usec = (select_timeout % 1000) * 1000;
|
||||||
int retval = select(max_fd + 1, &read_fd_set,
|
int retval = select(max_fd + 1, &read_fd_set,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue