mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
Fix Windows
This commit is contained in:
parent
73a0d7fc13
commit
42ea744901
3 changed files with 3 additions and 2 deletions
|
|
@ -28,7 +28,7 @@ impl<'a> EventSource<'a> {
|
|||
// More input is ready.
|
||||
WAIT_OBJECT_0 => Ok(()),
|
||||
// Stop waiting for events.
|
||||
r if r == WAIT_OBJECT_0 + 1 => Err(io::Error::from(io::ErrorKind::UnexpectedEof)),
|
||||
r if r == WAIT_OBJECT_0 + 1 => Err(io::Error::from(io::ErrorKind::ConnectionAborted)),
|
||||
// Timeout expired.
|
||||
WAIT_TIMEOUT => Err(io::Error::from(io::ErrorKind::TimedOut)),
|
||||
// An error occurred.
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@ impl EventStream {
|
|||
}
|
||||
// try_poll() already handles Interrupted, this is defensive.
|
||||
Err(e) if e.kind() == io::ErrorKind::Interrupted => continue,
|
||||
// event source was gracefully stopped, stop the stream as well.
|
||||
Err(e) if e.kind() == io::ErrorKind::ConnectionAborted => break,
|
||||
Err(e) => {
|
||||
tx.send(Err(e)).ok();
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ impl Raterm {
|
|||
Some(Err(_)) => {
|
||||
AppProxy::quit(Default::default());
|
||||
break;
|
||||
},
|
||||
}
|
||||
None => break,
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue