Skip to content

Commit

Permalink
Merge pull request #1211 from ming-relax/master
Browse files Browse the repository at this point in the history
Makes code style consistent in kafka client after refresh metadata
  • Loading branch information
bai committed Mar 19, 2019
2 parents 74fa6e8 + f21adde commit cbccf09
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion client.go
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,8 @@ func (client *client) Partitions(topic string) ([]int32, error) {
partitions = client.cachedPartitions(topic, allPartitions)
}

if partitions == nil {
// no partitions found after refresh metadata
if len(partitions) == 0 {
return nil, ErrUnknownTopicOrPartition
}

Expand Down

0 comments on commit cbccf09

Please sign in to comment.