mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-20 02:08:47 +00:00
cli: fix serve-web needs to wait a certain amount of time after machine startup (#236427)
Fixes #233155
This commit is contained in:
@@ -548,9 +548,11 @@ impl ConnectionManager {
|
|||||||
Err(_) => Quality::Stable,
|
Err(_) => Quality::Stable,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
let now = Instant::now();
|
||||||
let latest_version = tokio::sync::Mutex::new(cache.get().first().map(|latest_commit| {
|
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 {
|
Release {
|
||||||
name: String::from("0.0.0"), // Version information not stored on cache
|
name: String::from("0.0.0"), // Version information not stored on cache
|
||||||
commit: latest_commit.clone(),
|
commit: latest_commit.clone(),
|
||||||
|
|||||||
Reference in New Issue
Block a user