Blizzard / node-rdkafka

Node.js bindings for librdkafka
MIT License
2.11k stars 396 forks source link

fix: release opaque data on error in produce #954

Closed emelski closed 2 years ago

emelski commented 2 years ago

When there is an error trying to produce() messages, no delivery report is ever generated for the message. If the user specified opaque data for the message, the call to produce() will have "pinned" it, but with no delivery report, it is never released. This change checks for this condition and releases the opaque data when this happens.

Fixes: #953

iradul commented 2 years ago

Thank you for the PR!