fix filedescriptor::poll on macos

Need to use the subsecond microsecond value, rather than the total
microsecond value, otherwise `select(2)` will yield EINVAL.

The wezterm changes show where this error was bubbling up
and breaking the tls client code.
This commit is contained in:
Wez Furlong committed 2020-09-10 13:58:14 -07:00
1 parent 6430952d74
commit aae287c4f2
5 files changed
+19 -11

No files matched your search

+1 -1
View File
@@ -440,7 +440,7 @@ mod macos {
let mut timeout = duration.map(|d| timeval {
tv_sec: d.as_secs() as _,
tv_usec: d.as_micros() as _,
tv_usec: d.subsec_micros() as _,
});
let res = unsafe {