mirror of
https://github.com/chatmail/core.git
synced 2026-05-08 09:26:29 +03:00
Merge pull request #2040 from deltachat/workaround-spawned-tasks
workaround executer-blocking-handling bug
This commit is contained in:
10
src/blob.rs
10
src/blob.rs
@@ -63,6 +63,12 @@ impl<'a> BlobObject<'a> {
|
|||||||
blobname: name.clone(),
|
blobname: name.clone(),
|
||||||
cause: err.into(),
|
cause: err.into(),
|
||||||
})?;
|
})?;
|
||||||
|
|
||||||
|
// workaround a bug in async-std
|
||||||
|
// (the executor does not handle blocking operation in Drop correctly,
|
||||||
|
// see https://github.com/async-rs/async-std/issues/900 )
|
||||||
|
let _ = file.flush().await;
|
||||||
|
|
||||||
let blob = BlobObject {
|
let blob = BlobObject {
|
||||||
blobdir,
|
blobdir,
|
||||||
name: format!("$BLOBDIR/{}", name),
|
name: format!("$BLOBDIR/{}", name),
|
||||||
@@ -151,6 +157,10 @@ impl<'a> BlobObject<'a> {
|
|||||||
cause: err,
|
cause: err,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// workaround, see create() for details
|
||||||
|
let _ = dst_file.flush().await;
|
||||||
|
|
||||||
let blob = BlobObject {
|
let blob = BlobObject {
|
||||||
blobdir: context.get_blobdir(),
|
blobdir: context.get_blobdir(),
|
||||||
name: format!("$BLOBDIR/{}", name),
|
name: format!("$BLOBDIR/{}", name),
|
||||||
|
|||||||
Reference in New Issue
Block a user