Skip to content

Commit 07c2b51

Browse files
authored
Fix Persistence RecoveryTick timer leak (#7343)
1 parent de98c10 commit 07c2b51

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/core/Akka.Persistence/Eventsourced.Recovery.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ bool RecoveryBehavior(object message)
100100
Unhandled(offer);
101101
}
102102
}
103-
catch(Exception ex)
103+
catch (Exception ex)
104104
{
105105
try
106106
{
@@ -150,6 +150,7 @@ bool RecoveryBehavior(object message)
150150
}
151151
catch (Exception)
152152
{
153+
timeoutCancelable.Cancel();
153154
ReturnRecoveryPermit();
154155
throw;
155156
}
@@ -261,6 +262,7 @@ private EventsourcedState Recovering(Receive recoveryBehavior, TimeSpan timeout)
261262
}
262263
catch (Exception)
263264
{
265+
timeoutCancelable.Cancel();
264266
ReturnRecoveryPermit();
265267
throw;
266268
}

0 commit comments

Comments
 (0)