We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8204917 commit 818380bCopy full SHA for 818380b
src/Confluent.Kafka/AdminClient.cs
@@ -131,10 +131,10 @@ private Task StartPollTask(CancellationToken ct)
131
while (true)
132
{
133
ct.ThrowIfCancellationRequested();
134
-
+ IntPtr eventPtr = IntPtr.Zero;
135
try
136
137
- var eventPtr = kafkaHandle.QueuePoll(resultQueue, this.cancellationDelayMaxMs);
+ eventPtr = kafkaHandle.QueuePoll(resultQueue, this.cancellationDelayMaxMs);
138
if (eventPtr == IntPtr.Zero)
139
140
continue;
@@ -351,6 +351,13 @@ private Task StartPollTask(CancellationToken ct)
351
this.DisposeResources();
352
break;
353
}
354
+ finally
355
+ {
356
+ if (eventPtr != IntPtr.Zero)
357
358
+ Librdkafka.event_destroy(eventPtr);
359
+ }
360
361
362
363
catch (OperationCanceledException) {}
0 commit comments