wbarnha / kafka-python-ng

Fork for Python client for Apache Kafka
https://wbarnha.github.io/kafka-python-ng/
Apache License 2.0
42 stars 4 forks source link

Avoid 100% CPU usage while socket is closed #156

Closed wbarnha closed 3 months ago

wbarnha commented 3 months ago

After stop/start kafka service, kafka-python may use 100% CPU caused by busy-retry while the socket was closed. This fix the issue by unregister the socket if the fd is negative.


This change is Reviewable