mirror of
https://github.com/feschber/lan-mouse.git
synced 2026-03-29 08:00:55 +03:00
fix interrupted syscall when waking from suspend (#23)
This commit is contained in:
committed by
GitHub
parent
1a4d0e05be
commit
16311f8ae6
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user