diff --git a/crates/notebook/src/background.rs b/crates/notebook/src/background.rs index e8fb6834151d73fd98f882b23f178063422f2a32..c8f780bc80176452387485de5abfda82ccb3117f 100644 --- a/crates/notebook/src/background.rs +++ b/crates/notebook/src/background.rs @@ -539,12 +539,14 @@ impl Background { .unwrap_or_default() } - /// Reads every section's stamp now, working offline included (Sync Now). + /// Reads every section's stamp now, working offline included (Sync Now). A section already + /// due keeps its place: waking again while a round runs would otherwise tie every section + /// at now, and the first would be checked over and over while the rest waited. pub fn wake(&self) { if let Ok(mut watched) = self.0.watched.lock() { let now = Instant::now(); for watch in &mut watched.sections { - watch.due = now; + watch.due = watch.due.min(now); watch.current = false; } }