mirror of
https://git.asonix.dog/asonix/pict-rs
synced 2024-11-20 11:21:14 +00:00
Bail on closed semaphore (semaphore shouldn't close anyway)
This commit is contained in:
parent
39de25cbfd
commit
ac9cade3e4
2 changed files with 2 additions and 2 deletions
|
@ -59,7 +59,7 @@ async fn process<R: FullRepo, S: Store + 'static>(
|
|||
timeout: u64,
|
||||
hash: R::Bytes,
|
||||
) -> Result<(Details, Bytes), Error> {
|
||||
let permit = crate::PROCESS_SEMAPHORE.acquire().await;
|
||||
let permit = crate::PROCESS_SEMAPHORE.acquire().await?;
|
||||
|
||||
let identifier = if let Some(identifier) = repo
|
||||
.still_identifier_from_alias::<S::Identifier>(&alias)
|
||||
|
|
|
@ -67,7 +67,7 @@ where
|
|||
.await
|
||||
.map_err(|_| UploadError::AggregateTimeout)??;
|
||||
|
||||
let permit = crate::PROCESS_SEMAPHORE.acquire().await;
|
||||
let permit = crate::PROCESS_SEMAPHORE.acquire().await?;
|
||||
|
||||
tracing::trace!("Validating bytes");
|
||||
let (input_type, validated_reader) =
|
||||
|
|
Loading…
Reference in a new issue