|
@@ -99,7 +99,13 @@ func (client *Client) Close() error {
|
|
|
func (client *Client) Partitions(topic string) ([]int32, error) {
|
|
|
partitions := client.cachedPartitions(topic)
|
|
|
|
|
|
- if partitions == nil {
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ if len(partitions) == 0 {
|
|
|
err := client.RefreshTopicMetadata(topic)
|
|
|
if err != nil {
|
|
|
return nil, err
|