Skip to content

Commit 3a6ec74

Browse files
committed
Dont do api versions check if api_versions config is set
1 parent 013f3e6 commit 3a6ec74

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
@@ -536,7 +536,10 @@ def _try_handshake(self):
536536

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

0 commit comments

Comments
 (0)