Skip to content

Commit 16311f8

Browse files
authored
fix interrupted syscall when waking from suspend (#23)
1 parent 1a4d0e0 commit 16311f8

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/event/server.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,11 @@ impl Server {
7373
pub fn run(&mut self) -> Result<()> {
7474
let mut events = Events::with_capacity(10);
7575
loop {
76-
self.poll.poll(&mut events, None)?;
76+
match self.poll.poll(&mut events, None) {
77+
Ok(()) => (),
78+
Err(e) if e.kind() == ErrorKind::Interrupted => continue,
79+
Err(e) => return Err(e),
80+
}
7781
for event in &events {
7882
if !event.is_readable() { continue }
7983
match event.token() {

0 commit comments

Comments
 (0)