mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-27 07:56:14 +01:00
gsocket: fix g_socket_condition_timed_wait() recovery after EINTR
After getting an EINTR, g_socket_condition_timed_wait() has to adjust its timeout, but it was trying to convert from nanoseconds to microseconds by multiplying by 1000 rather than dividing... Oops. https://bugzilla.gnome.org/show_bug.cgi?id=724239
This commit is contained in:
parent
5a4478664b
commit
4139b26f3e
@ -3674,7 +3674,7 @@ g_socket_condition_timed_wait (GSocket *socket,
|
||||
|
||||
if (timeout != -1)
|
||||
{
|
||||
timeout -= (g_get_monotonic_time () - start_time) * 1000;
|
||||
timeout -= (g_get_monotonic_time () - start_time) / 1000;
|
||||
if (timeout < 0)
|
||||
timeout = 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user