2
0
Fork 0
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:
asonix 2023-12-04 15:43:55 -06:00
parent 39de25cbfd
commit ac9cade3e4
2 changed files with 2 additions and 2 deletions

View file

@ -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)

View file

@ -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) =