Skip to content

Commit

Permalink
Merge pull request dpkp#10 from aiven/orange-cpu-usage-while-socket-c…
Browse files Browse the repository at this point in the history
…losed-revert-sleep

Avoid 100% CPU usage while socket is closed (sleep)

aiven#10
  • Loading branch information
juhovh-aiven authored Aug 12, 2020
2 parents b158730 + 21b1f94 commit 23507f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kafka/client_async.py
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,7 @@ def _poll(self, timeout):

for key, events in ready:
if key.fileobj.fileno() < 0:
self._selector.unregister(key.fileobj)
time.sleep(0.1)

if key.fileobj is self._wake_r:
self._clear_wake_fd()
Expand Down

0 comments on commit 23507f4

Please sign in to comment.