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;
|
||||
while let Ok(Some(line)) = lines.next_line().await {
|
||||
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) {
|
||||
version = Some(hey.version);
|
||||
}
|
||||
|
|
@ -92,9 +92,9 @@ impl Client {
|
|||
|
||||
if version != Some(BodyHi::version()) {
|
||||
bail!(
|
||||
"Incompatible version (Yazi {}, Ya {})",
|
||||
version.as_deref().unwrap_or("Unknown"),
|
||||
BodyHi::version()
|
||||
"Incompatible version (Ya {}, Yazi {})",
|
||||
BodyHi::version(),
|
||||
version.as_deref().unwrap_or("Unknown")
|
||||
);
|
||||
}
|
||||
Ok(())
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue