Skip to content

Commit fafefdf

Browse files
committed
fix(Dashboard.StateManagement): calling cancel before disposing of the cancellation token source in the component store
Signed-off-by: Jean-Baptiste Bianchi <[email protected]>
1 parent 47935b4 commit fafefdf

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/dashboard/Synapse.Dashboard.StateManagement/ComponentStore.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ protected virtual void Dispose(bool disposing)
8989
{
9090
if (disposing)
9191
{
92+
this.CancellationTokenSource.Cancel();
9293
this.CancellationTokenSource.Dispose();
9394
this._subject.Dispose();
9495
}
@@ -114,6 +115,7 @@ protected virtual ValueTask DisposeAsync(bool disposing)
114115
{
115116
if (disposing)
116117
{
118+
this.CancellationTokenSource.Cancel();
117119
this.CancellationTokenSource.Dispose();
118120
this._subject.Dispose();
119121
}

0 commit comments

Comments
 (0)