fix interrupted syscall when waking from suspend (#23)

This commit is contained in:
Ferdinand Schober
2023-09-19 19:33:04 +02:00
committed by GitHub
parent 1a4d0e05be
commit 16311f8ae6

View File

@@ -73,7 +73,11 @@ impl Server {
pub fn run(&mut self) -> Result<()> {
let mut events = Events::with_capacity(10);
loop {
self.poll.poll(&mut events, None)?;
match self.poll.poll(&mut events, None) {
Ok(()) => (),
Err(e) if e.kind() == ErrorKind::Interrupted => continue,
Err(e) => return Err(e),
}
for event in &events {
if !event.is_readable() { continue }
match event.token() {