Add sync restriction on CacheStream
This commit is contained in:
parent
54c8fe1cb3
commit
b41ae8cb79
2 changed files with 2 additions and 2 deletions
2
src/cache/fs.rs
vendored
2
src/cache/fs.rs
vendored
|
@ -65,7 +65,7 @@ pub(super) async fn read_file(
|
||||||
|
|
||||||
let parsed_metadata;
|
let parsed_metadata;
|
||||||
let mut maybe_header = None;
|
let mut maybe_header = None;
|
||||||
let mut reader: Option<Pin<Box<dyn MetadataFetch + Send>>> = None;
|
let mut reader: Option<Pin<Box<dyn MetadataFetch + Send + Sync>>> = None;
|
||||||
if let Ok(metadata) = maybe_metadata {
|
if let Ok(metadata) = maybe_metadata {
|
||||||
// image is decrypted
|
// image is decrypted
|
||||||
if ENCRYPTION_KEY.get().is_some() {
|
if ENCRYPTION_KEY.get().is_some() {
|
||||||
|
|
2
src/cache/mod.rs
vendored
2
src/cache/mod.rs
vendored
|
@ -241,7 +241,7 @@ pub struct CacheEntry {
|
||||||
|
|
||||||
pub enum CacheStream {
|
pub enum CacheStream {
|
||||||
Memory(MemStream),
|
Memory(MemStream),
|
||||||
Completed(FramedRead<Pin<Box<dyn MetadataFetch + Send>>, BytesCodec>),
|
Completed(FramedRead<Pin<Box<dyn MetadataFetch + Send + Sync>>, BytesCodec>),
|
||||||
}
|
}
|
||||||
|
|
||||||
impl From<CachedImage> for CacheStream {
|
impl From<CachedImage> for CacheStream {
|
||||||
|
|
Loading…
Reference in a new issue