Skip to content

Commit

Permalink
_send_request_to_controller returns a raw result, not a future
Browse files Browse the repository at this point in the history
  • Loading branch information
TylerLubeck authored and jeffwidman committed Feb 6, 2020
1 parent f92889a commit 6e2978e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions kafka/admin/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -493,12 +493,12 @@ def _get_cluster_metadata(self, topics=None, auto_topic_creation=False, use_cont
)

if use_controller:
future = self._send_request_to_controller(request)
else:
future = self._send_request_to_node(
self._client.least_loaded_node(),
request
)
return self._send_request_to_controller(request)

future = self._send_request_to_node(
self._client.least_loaded_node(),
request
)
self._wait_for_futures([future])
return future.value

Expand Down

0 comments on commit 6e2978e

Please sign in to comment.