Skip to content
This repository was archived by the owner on Jul 11, 2025. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions kafka/producer/kafka.py
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,8 @@ def close(self, timeout=None):
timeout (float, optional): timeout in seconds to wait for completion.
"""

# If there are any pending messages, send them now
self.flush(timeout)
# drop our atexit handler now to avoid leaks
self._unregister_cleanup()

Expand Down