mirror of
https://github.com/feschber/lan-mouse.git
synced 2026-04-18 13:51:29 +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<()> {
|
pub fn run(&mut self) -> Result<()> {
|
||||||
let mut events = Events::with_capacity(10);
|
let mut events = Events::with_capacity(10);
|
||||||
loop {
|
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 {
|
for event in &events {
|
||||||
if !event.is_readable() { continue }
|
if !event.is_readable() { continue }
|
||||||
match event.token() {
|
match event.token() {
|
||||||
|
|||||||
Reference in New Issue
Block a user