Skip to content

Commit 0e289bd

Browse files
committed
Dont do api versions check if api_versions config is set
1 parent 8a0f826 commit 0e289bd

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

kafka/conn.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,10 @@ def _try_handshake(self):
537537

538538
def _try_api_versions_check(self):
539539
if self._api_versions_future is None:
540-
if self._check_version_idx is None:
540+
if self.config['api_version'] is not None:
541+
self._api_version = self.config['api_version']
542+
return True
543+
elif self._check_version_idx is None:
541544
# TODO: Implement newer versions
542545
# ((3, 9), ApiVersionsRequest[4]()),
543546
# ((2, 4), ApiVersionsRequest[3]()),

0 commit comments

Comments
 (0)