Skip to content

Commit

Permalink
Merge pull request #11 from scireum/feature/aha/loader-fix
Browse files Browse the repository at this point in the history
Fixes a bug in the loader architecture.
  • Loading branch information
andyHa authored Feb 11, 2022
2 parents 06f110a + 7775ccf commit 9050b78
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion jupiter-rs/src/repository/loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,7 @@ async fn loader_changed(
info.namespace = namespace.clone();

if info.needs_reload().await? {
let was_enabled = info.enabled;
info.enabled = namespaces.contains(&namespace);
*info.last_error.lock().unwrap() = "".to_string();

Expand All @@ -358,7 +359,7 @@ async fn loader_changed(
background_task_sender
.send(BackgroundCommand::ExecuteLoaderForChange(info.clone()))
.await?;
} else {
} else if was_enabled {
info.last_load = None;
background_task_sender
.send(BackgroundCommand::ExecuteLoaderForDelete(info.clone()))
Expand Down

0 comments on commit 9050b78

Please sign in to comment.