Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions crates/flycheck/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,12 +157,9 @@ impl FlycheckActor {
while let Some(event) = self.next_event(&inbox) {
match event {
Event::Restart(Restart) => {
if let Some(cargo_handle) = self.cargo_handle.take() {
// Cancel the previously spawned process
cargo_handle.cancel();
}
// Cancel the previously spawned process
self.cancel_check_process();
while let Ok(Restart) = inbox.recv_timeout(Duration::from_millis(50)) {}
self.progress(Progress::DidCancel);

let command = self.check_command();
tracing::debug!(?command, "will restart flycheck");
Expand Down Expand Up @@ -221,6 +218,7 @@ impl FlycheckActor {
self.progress(Progress::DidCancel);
}
}

fn check_command(&self) -> Command {
let mut cmd = match &self.config {
FlycheckConfig::CargoCommand {
Expand Down