Add shutting down of daemons when the repository is changed

Signed-off-by: trivernis <trivernis@protonmail.com>
pull/4/head
trivernis 3 years ago
parent 03718e9a67
commit b91a3ab4d2

@ -104,6 +104,15 @@ pub async fn select_repository(
.ok_or(PluginError::from(
format!("Repository '{}' not found", name).as_str(),
))?;
if let Some(path) = app_state
.active_repo
.read()
.await
.clone()
.and_then(|r| r.path)
{
app_state.stop_running_daemon(&path).await?;
}
let address = if let Some(address) = &repo.address {
address.clone()
} else {

Loading…
Cancel
Save