Skip to content

Commit

Permalink
Fix Persistence RecoveryTick timer leak (#7343)
Browse files Browse the repository at this point in the history
  • Loading branch information
Arkatufus authored Oct 24, 2024
1 parent de98c10 commit 07c2b51
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/core/Akka.Persistence/Eventsourced.Recovery.cs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ bool RecoveryBehavior(object message)
Unhandled(offer);
}
}
catch(Exception ex)
catch (Exception ex)
{
try
{
Expand Down Expand Up @@ -150,6 +150,7 @@ bool RecoveryBehavior(object message)
}
catch (Exception)
{
timeoutCancelable.Cancel();
ReturnRecoveryPermit();
throw;
}
Expand Down Expand Up @@ -261,6 +262,7 @@ private EventsourcedState Recovering(Receive recoveryBehavior, TimeSpan timeout)
}
catch (Exception)
{
timeoutCancelable.Cancel();
ReturnRecoveryPermit();
throw;
}
Expand Down

0 comments on commit 07c2b51

Please sign in to comment.