diff options
author | Rémi Verschelde <remi@verschelde.fr> | 2021-04-27 13:45:52 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-27 13:45:52 +0200 |
commit | 1943d2bda67d7f5161c6e29586099ec42455d118 (patch) | |
tree | c5c3cf9edefb18944a23fefc52155da7d47897d5 | |
parent | eb747848391a363dbda014c4c3e7ec2757633aa0 (diff) | |
parent | 46f7b0f74bc8907fe988eb55169203a095babaf3 (diff) |
Merge pull request #48203 from Faless/net/4.x_socket_poll_timeout
[Net] Fix socket poll timeout on Windows.
-rw-r--r-- | drivers/unix/net_socket_posix.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/unix/net_socket_posix.cpp b/drivers/unix/net_socket_posix.cpp index 19753943c8..3baabdd2c7 100644 --- a/drivers/unix/net_socket_posix.cpp +++ b/drivers/unix/net_socket_posix.cpp @@ -446,7 +446,7 @@ Error NetSocketPosix::poll(PollType p_type, int p_timeout) const { FD_ZERO(&wr); FD_ZERO(&ex); FD_SET(_sock, &ex); - struct timeval timeout = { p_timeout, 0 }; + struct timeval timeout = { p_timeout / 1000, (p_timeout % 1000) * 1000 }; // For blocking operation, pass nullptr timeout pointer to select. struct timeval *tp = nullptr; if (p_timeout >= 0) { |