Fixes #14269 - semaphore released too many times as it always happens in the finally, which is 1 too many times when the upload was a success

This commit is contained in:
Sebastiaan Janssen
2023-06-20 14:02:53 +02:00
parent c608cc83ba
commit f91fde2462

View File

@@ -827,13 +827,10 @@ public class MediaController : ContentControllerBase
}
catch (Exception ex)
{
_postAddFileSemaphore.Release();
_logger.LogError(ex, "Something went wrong adding files");
throw;
}
finally
{
_postAddFileSemaphore.Release();
}
}
private bool IsFolderCreationAllowedHere(int parentId)