Skip to content

Commit 9154916

Browse files
authored
yield pre-close (#592)
1 parent a67ac6d commit 9154916

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
- [Enhancement] Support producing and consuming of headers with mulitple values (KIP-82).
66
- [Enhancement] Allow native Kafka customization poll time.
77
- [Enhancement] Roll out experimental jruby support.
8+
- [Fix] Fix issue where post-closed producer C topics refs would not be cleaned.
89

910
## 0.21.0 (2025-02-13)
1011
- [Enhancement] Bump librdkafka to `2.8.0`

lib/rdkafka/native_kafka.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,8 @@ def close(object_id=nil)
126126
# and would continue to run, trying to destroy inner twice
127127
return unless @inner
128128

129+
yield if block_given?
130+
129131
Rdkafka::Bindings.rd_kafka_destroy(@inner)
130132
@inner = nil
131133
@opaque = nil

0 commit comments

Comments
 (0)