mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-24 10:38:59 +01:00
stop tunnel when executable gets deleted (#181505)
stop when executable gets deleted
This commit is contained in:
committed by
GitHub
parent
3d3e22e21d
commit
0c85b95c48
@@ -52,3 +52,10 @@ pub fn find_running_process(name: &Path) -> Option<u32> {
|
||||
}
|
||||
None
|
||||
}
|
||||
|
||||
pub async fn wait_until_exe_deleted(current_exe: &Path, poll_ms: u64) {
|
||||
let duration = Duration::from_millis(poll_ms);
|
||||
while current_exe.exists() {
|
||||
tokio::time::sleep(duration).await;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user