We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 23534b4 commit 1a91a54Copy full SHA for 1a91a54
kafka/producer/kafka.py
@@ -445,7 +445,7 @@ def _unregister_cleanup(self):
445
self._cleanup = None
446
447
def __del__(self):
448
- self.close(timeout=0)
+ self.close()
449
450
def close(self, timeout=None):
451
"""Close this producer.
@@ -484,14 +484,10 @@ def close(self, timeout=None):
484
self._sender.join(timeout)
485
486
if self._sender is not None and self._sender.is_alive():
487
-
488
log.info("Proceeding to force close the producer since pending"
489
" requests could not be completed within timeout %s.",
490
timeout)
491
self._sender.force_close()
492
- # Only join the sender thread when not calling from callback.
493
- if not invoked_from_callback:
494
- self._sender.join()
495
496
self._metrics.close()
497
try:
0 commit comments