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.
|
// More input is ready.
|
||||||
WAIT_OBJECT_0 => Ok(()),
|
WAIT_OBJECT_0 => Ok(()),
|
||||||
// Stop waiting for events.
|
// 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.
|
// Timeout expired.
|
||||||
WAIT_TIMEOUT => Err(io::Error::from(io::ErrorKind::TimedOut)),
|
WAIT_TIMEOUT => Err(io::Error::from(io::ErrorKind::TimedOut)),
|
||||||
// An error occurred.
|
// An error occurred.
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,7 @@ impl EventStream {
|
||||||
}
|
}
|
||||||
// try_poll() already handles Interrupted, this is defensive.
|
// try_poll() already handles Interrupted, this is defensive.
|
||||||
Err(e) if e.kind() == io::ErrorKind::Interrupted => continue,
|
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) if e.kind() == io::ErrorKind::ConnectionAborted => break,
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
tx.send(Err(e)).ok();
|
tx.send(Err(e)).ok();
|
||||||
|
|
|
||||||
|
|
@ -109,7 +109,7 @@ impl Raterm {
|
||||||
Some(Err(_)) => {
|
Some(Err(_)) => {
|
||||||
AppProxy::quit(Default::default());
|
AppProxy::quit(Default::default());
|
||||||
break;
|
break;
|
||||||
},
|
}
|
||||||
None => break,
|
None => break,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue