1
1
mirror of https://github.com/wez/wezterm.git synced 2025-01-08 23:17:36 +03:00

window: ignore EINTR, which mio now propagates

The upgrade to a newer mio version caused the poll method
to report EINTR in some cases.

We don't need to terminate for those, so suppress it.

refs: https://github.com/wez/wezterm/issues/1955
This commit is contained in:
Wez Furlong 2022-05-06 06:56:32 -07:00
parent 39f53161be
commit 021c0a9bcd
2 changed files with 6 additions and 0 deletions

View File

@ -317,6 +317,9 @@ impl ConnectionOps for WaylandConnection {
self.flush()?;
if let Err(err) = poll.poll(&mut events, timeout) {
if err.kind() == std::io::ErrorKind::Interrupted {
continue;
}
bail!("polling for events: {:?}", err);
}

View File

@ -229,6 +229,9 @@ impl ConnectionOps for XConnection {
self.dispatch_pending_events()?;
if let Err(err) = poll.poll(&mut events, None) {
if err.kind() == std::io::ErrorKind::Interrupted {
continue;
}
bail!("polling for events: {:?}", err);
}
}