wayland: ignore errors when reading socket
On Phosh, the EWOULDBLOCK error may be emitted when reading from the Wayland socket, which is not fatal. Ignore errors encountered while reading, as fatal errors would be emitted by other operations in the main loop.
This commit is contained in:
parent
bc9056aa8d
commit
b378240a38
2 changed files with 4 additions and 2 deletions
|
|
@ -87,7 +87,8 @@ async fn main()
|
|||
poller.delete(fd).unwrap();
|
||||
|
||||
if !events.is_empty() {
|
||||
guard.read().unwrap();
|
||||
// This may still emit EWOULDBLOCK errors.
|
||||
let _ = guard.read();
|
||||
queue.dispatch_pending(&mut dispatcher).unwrap();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -57,7 +57,8 @@ fn main()
|
|||
poller.delete(fd).unwrap();
|
||||
|
||||
if !events.is_empty() {
|
||||
guard.read().unwrap();
|
||||
// This may still emit EWOULDBLOCK errors.
|
||||
let _ = guard.read();
|
||||
queue.dispatch_pending(&mut dispatcher).unwrap();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue