mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
..
This commit is contained in:
parent
08b4b8f272
commit
a91c5e3771
1 changed files with 4 additions and 4 deletions
|
|
@ -80,7 +80,7 @@ impl Client {
|
||||||
let mut version = None;
|
let mut version = None;
|
||||||
while let Ok(Some(line)) = lines.next_line().await {
|
while let Ok(Some(line)) = lines.next_line().await {
|
||||||
match line.split(',').next() {
|
match line.split(',').next() {
|
||||||
Some("hey") => {
|
Some("hey") if version.is_none() => {
|
||||||
if let Ok(Body::Hey(hey)) = Payload::from_str(&line).map(|p| p.body) {
|
if let Ok(Body::Hey(hey)) = Payload::from_str(&line).map(|p| p.body) {
|
||||||
version = Some(hey.version);
|
version = Some(hey.version);
|
||||||
}
|
}
|
||||||
|
|
@ -92,9 +92,9 @@ impl Client {
|
||||||
|
|
||||||
if version != Some(BodyHi::version()) {
|
if version != Some(BodyHi::version()) {
|
||||||
bail!(
|
bail!(
|
||||||
"Incompatible version (Yazi {}, Ya {})",
|
"Incompatible version (Ya {}, Yazi {})",
|
||||||
version.as_deref().unwrap_or("Unknown"),
|
BodyHi::version(),
|
||||||
BodyHi::version()
|
version.as_deref().unwrap_or("Unknown")
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
Ok(())
|
Ok(())
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue