Skip to content

Commit 7f6be79

Browse files
authored
Properly clear TResources (#358)
1 parent 12db6cf commit 7f6be79

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/ES.Kubernetes.Reflector/Core/Mirroring/ResourceMirror.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ public Task Handle(WatcherClosed notification, CancellationToken cancellationTok
4949
notification.ResourceType != typeof(V1Namespace)) return Task.CompletedTask;
5050
if (notification.ResourceType != typeof(TResource)) return Task.CompletedTask;
5151

52+
Logger.LogDebug("Cleared sources for {Type} resources", typeof(TResource).Name);
5253

5354
_autoSources.Clear();
5455
_notFoundCache.Clear();

src/ES.Kubernetes.Reflector/Core/Watchers/WatcherBackgroundService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ await Mediator.Publish(new WatcherEvent
6868

6969
await Mediator.Publish(new WatcherClosed
7070
{
71-
ResourceType = typeof(V1Secret),
71+
ResourceType = typeof(TResource),
7272
Faulted = sessionFaulted
7373
}, stoppingToken);
7474

0 commit comments

Comments
 (0)