We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NetSocketPosix::poll
Godot version: Any
OS/device including version: Windows and Linux
Issue description:
Timeout unit is inconsistent in NetSocketPosix::poll.
For example if we input 1000 in p_timeout parameter. On Windows we place this value in a timeval struct in this way:
1000
p_timeout
timeval
godot/drivers/unix/net_socket_posix.cpp
Line 449 in 15a85fe
seconds
0
microseconds
On Linux we put the parameter directly into poll which takes the timeout in milliseconds:
poll
milliseconds
Line 510 in 15a85fe
At the end we waited 1000 milliseconds on Linux and 1000 seconds on Windows which obviously not equal.
p.s.: I'm happily submitting a pr if we decided on the desired unit
Steps to reproduce: n/a
Minimal reproduction project: n/a
The text was updated successfully, but these errors were encountered:
cc @Faless
I think microseconds would be better here as they are more granular. Just make sure the documentation is up-to-date on this.
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Godot version: Any
OS/device including version: Windows and Linux
Issue description:
Timeout unit is inconsistent in
NetSocketPosix::poll
.For example if we input
1000
inp_timeout
parameter.On Windows we place this value in a
timeval
struct in this way:godot/drivers/unix/net_socket_posix.cpp
Line 449 in 15a85fe
1000
seconds
and0
microseconds
.On Linux we put the parameter directly into
poll
which takes the timeout inmilliseconds
:godot/drivers/unix/net_socket_posix.cpp
Line 510 in 15a85fe
At the end we waited
1000
milliseconds
on Linux and1000
seconds
on Windows which obviously not equal.p.s.: I'm happily submitting a pr if we decided on the desired unit
Steps to reproduce: n/a
Minimal reproduction project: n/a
The text was updated successfully, but these errors were encountered: