mirror of
https://github.com/Myriad-Dreamin/tinymist.git
synced 2025-08-04 10:18:16 +00:00
fix: stop all will make it address change
This commit is contained in:
parent
91ba33b274
commit
3db931a1bb
1 changed files with 3 additions and 2 deletions
|
@ -227,8 +227,8 @@ impl PreviewState {
|
|||
}
|
||||
|
||||
pub(crate) fn stop_all(&mut self) {
|
||||
let watchers = std::mem::take(self.watchers.inner.lock().deref_mut());
|
||||
for (_, watcher) in watchers {
|
||||
let mut watchers = self.watchers.inner.lock();
|
||||
for (_, watcher) in watchers.iter_mut() {
|
||||
self.preview_tx
|
||||
.send(PreviewRequest::Kill(
|
||||
watcher.task_id().to_owned(),
|
||||
|
@ -236,6 +236,7 @@ impl PreviewState {
|
|||
))
|
||||
.log_error_with(|| format!("failed to send kill request({:?})", watcher.task_id()));
|
||||
}
|
||||
watchers.clear();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue