From 91e55da7e36c077ab09e30bc7241677cdba30307 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20Por=C4=99bski?= Date: Fri, 18 Oct 2024 16:35:43 +0200 Subject: [PATCH 1/2] dispose of AdminClient when closing KafkaStream --- core/Processors/Internal/TaskManager.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/core/Processors/Internal/TaskManager.cs b/core/Processors/Internal/TaskManager.cs index 99be0aaf..6868d728 100644 --- a/core/Processors/Internal/TaskManager.cs +++ b/core/Processors/Internal/TaskManager.cs @@ -190,6 +190,7 @@ public void Close() partitionsToTaskId.Clear(); changelogReader.Clear(); + adminClient.Dispose(); // if one delete request is in progress, we wait the result before closing the manager if (currentDeleteTask is {IsCompleted: false}) From 219e4b87922c09c9e054f01d15face5b8c3b4a21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20Por=C4=99bski?= Date: Tue, 22 Oct 2024 08:56:34 +0200 Subject: [PATCH 2/2] move disposing admin Client to the end of task manager close method --- core/Processors/Internal/TaskManager.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/Processors/Internal/TaskManager.cs b/core/Processors/Internal/TaskManager.cs index 6868d728..d110103d 100644 --- a/core/Processors/Internal/TaskManager.cs +++ b/core/Processors/Internal/TaskManager.cs @@ -190,11 +190,12 @@ public void Close() partitionsToTaskId.Clear(); changelogReader.Clear(); - adminClient.Dispose(); // if one delete request is in progress, we wait the result before closing the manager if (currentDeleteTask is {IsCompleted: false}) currentDeleteTask.GetAwaiter().GetResult(); + + adminClient.Dispose(); } internal int CommitAll()