]> granicus.if.org Git - php/commit
Clarify usage of max_fd in php_poll2() on Windows
authorChristoph M. Becker <cmbecker69@gmx.de>
Fri, 27 Dec 2019 09:11:01 +0000 (10:11 +0100)
committerChristoph M. Becker <cmbecker69@gmx.de>
Fri, 27 Dec 2019 12:41:29 +0000 (13:41 +0100)
commit388c582ee9a54a5b358e5aad21407ee339fcf1ef
tree3292d4cc81f83b6be45d83a32561baf06b48389d
parent7b69855bd0aa235ab72ce2bf8e9221cbe1053902
Clarify usage of max_fd in php_poll2() on Windows

Actually, `max_fd` is not used on Windows, since `PHP_SAFE_MAX_FD` and
`select` ignore it; so it makes no sense to calculate it in the loop.
Even worse, since `php_socket_t` is unsigned on Windows, it will never
be modified during the loop, because `SOCK_ERR` is already the largest
representable value of that type.

Therefore we skip the loop on Windows, and add a clarifying comment.
main/network.c