Skip to content

Commit

Permalink
First subscribe again, then dispose
Browse files Browse the repository at this point in the history
  • Loading branch information
Shai Katz committed Mar 29, 2021
1 parent 2596ec9 commit a5d8b28
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/crd-controller/HostedServices/V1Alpha2Controller.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,9 @@ public Task StartAsync(CancellationToken token)
mSubscription = ObserveKamusSecret(token);
Observable.Interval(TimeSpan.FromSeconds(mReconciliationIntervalInSeconds)).Subscribe((s) =>
{
mSubscription.Dispose();
var oldSubscription = mSubscription;
mSubscription = ObserveKamusSecret(token);
oldSubscription.Dispose();
});

mLogger.Information("Starting watch for KamusSecret V1Alpha2 events");
Expand Down

0 comments on commit a5d8b28

Please sign in to comment.