Moved retire on exception to final, so regardless of how the FileProcessor exits, it retires the channels.

This commit is contained in:
Carl Johnsen
2025-02-10 12:38:24 +01:00
parent 3b9fc188e1
commit 0b3ff33716
@@ -328,8 +328,6 @@ namespace Duplicati.Library.Main.Operation.Restore
catch (RetiredException)
{
Logging.Log.WriteVerboseMessage(LOGTAG, "RetiredProcess", null, "File processor retired");
block_request.Retire();
block_response.Retire();
if (options.InternalProfiling)
{
@@ -340,9 +338,12 @@ namespace Duplicati.Library.Main.Operation.Restore
catch (Exception ex)
{
Logging.Log.WriteErrorMessage(LOGTAG, "FileProcessingError", ex, "Error during file processing");
throw;
}
finally
{
block_request.Retire();
block_response.Retire();
throw;
}
});
}