We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d5c4348 commit c3c20cbCopy full SHA for c3c20cb
kafka/client_async.py
@@ -30,7 +30,7 @@
30
from kafka.util import Dict, WeakMethod
31
# Although this looks unused, it actually monkey-patches socket.socketpair()
32
# and should be left in as long as we're using socket.socketpair() in this file
33
-from kafka.vendor import socketpair
+from kafka.vendor import socketpair # noqa: F401
34
from kafka.version import __version__
35
36
if six.PY2:
@@ -1184,7 +1184,7 @@ def is_expired(self, conn_id):
1184
1185
def next_check_ms(self):
1186
now = time.time()
1187
- if not self.lru_connections:
+ if not self.lru_connections or self.next_idle_close_check_time == float('inf'):
1188
return float('inf')
1189
elif self.next_idle_close_check_time <= now:
1190
return 0
0 commit comments