mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 20:14:49 +00:00
fix issues with failed updates
This commit is contained in:
committed by
Keagan McClelland
parent
8a559b71fd
commit
3ab078a878
@@ -1,6 +1,6 @@
|
||||
use std::cmp::Ordering;
|
||||
use std::path::Path;
|
||||
use std::time::Duration;
|
||||
use std::time::{Duration, Instant};
|
||||
|
||||
use divrem::DivRem;
|
||||
use proptest_derive::Arbitrary;
|
||||
@@ -37,6 +37,10 @@ impl SoundInterface {
|
||||
}
|
||||
})
|
||||
.with_ctx(|_| (ErrorKind::SoundError, EXPORT_FILE.to_string_lossy()))?;
|
||||
let instant = Instant::now();
|
||||
while tokio::fs::metadata(&*PERIOD_FILE).await.is_err()
|
||||
&& instant.elapsed() < Duration::from_secs(1)
|
||||
{}
|
||||
Ok(SoundInterface(Some(guard)))
|
||||
}
|
||||
#[instrument(skip(self))]
|
||||
|
||||
Reference in New Issue
Block a user