| ... | @@ -459,7 +459,8 @@ impl Background { | ... | @@ -459,7 +459,8 @@ impl Background { |
| 459 | self.0.touched(paths); | 459 | self.0.touched(paths); |
| 460 | } | 460 | } |
| 461 | | 461 | |
| 462 | /// Each watched section's status, in watch order; held sections report their live state. | 462 | /// Each watched section's status, in watch order: a held section's live state while its |
| | 463 | /// session syncs, otherwise this thread's last check of it. |
| 463 | pub fn status(&self) -> Vec<(String, SyncStatus)> { | 464 | pub fn status(&self) -> Vec<(String, SyncStatus)> { |
| 464 | let sections: Vec<_> = self.0.watched.lock().map_or_else( | 465 | let sections: Vec<_> = self.0.watched.lock().map_or_else( |
| 465 | |_| Vec::new(), | 466 | |_| Vec::new(), |
| ... | @@ -489,7 +490,8 @@ impl Background { | ... | @@ -489,7 +490,8 @@ impl Background { |
| 489 | .into_iter() | 490 | .into_iter() |
| 490 | .map(|(path, fallback, held)| { | 491 | .map(|(path, fallback, held)| { |
| 491 | let live = held.and_then(|held| { | 492 | let live = held.and_then(|held| { |
| 492 | let worker = held.worker.upgrade()?; | 493 | let worker = (held.worker.upgrade()) |
| | 494 | .filter(|worker| !worker.stopped.load(Ordering::Acquire))?; |
| 493 | let replica = held.replica.upgrade()?; | 495 | let replica = held.replica.upgrade()?; |
| 494 | let observed = held.observed.upgrade()?; | 496 | let observed = held.observed.upgrade()?; |
| 495 | let synced = | 497 | let synced = |