fix(cli): fix a race condition where the program will hang

This commit is contained in:
Boshen 2023-08-21 16:20:33 +08:00
parent 773b77922e
commit 58d2d1e30d
No known key found for this signature in database
GPG key ID: 234DA6A7079C6801

View file

@ -54,13 +54,13 @@ impl LintService {
if !diagnostics.1.is_empty() {
tx_error.send(Some(diagnostics)).unwrap();
}
if done && processing.is_empty() {
tx_error.send(None).unwrap();
break;
}
}
}
if done && processing.is_empty() {
tx_error.send(None).unwrap();
break;
}
}
});
}