cli: fix serve-web needs to wait a certain amount of time after machine startup (#236427)
Fixes #233155pull/236433/head
parent
2a4ed84748
commit
3e86f1e6cd
|
@ -548,9 +548,11 @@ impl ConnectionManager {
|
|||
Err(_) => Quality::Stable,
|
||||
});
|
||||
|
||||
let now = Instant::now();
|
||||
let latest_version = tokio::sync::Mutex::new(cache.get().first().map(|latest_commit| {
|
||||
(
|
||||
Instant::now() - Duration::from_secs(RELEASE_CHECK_INTERVAL),
|
||||
now.checked_sub(Duration::from_secs(RELEASE_CHECK_INTERVAL))
|
||||
.unwrap_or(now), // handle 0-ish instants, #233155
|
||||
Release {
|
||||
name: String::from("0.0.0"), // Version information not stored on cache
|
||||
commit: latest_commit.clone(),
|
||||
|
|
Loading…
Reference in New Issue