Skip to content

Commit

Permalink
fix: correct unsupported version check (#2528)
Browse files Browse the repository at this point in the history
Signed-off-by: Mark Hindess <mark.hindess@gmail.com>
  • Loading branch information
hindessm committed Jul 28, 2023
1 parent c28ecc0 commit 34bc8f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion metadata_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func NewMetadataRequest(version KafkaVersion, topics []string) *MetadataRequest
}

func (r *MetadataRequest) encode(pe packetEncoder) (err error) {
if r.Version < 0 || r.Version > 12 {
if r.Version < 0 || r.Version > 7 {
return PacketEncodingError{"invalid or unsupported MetadataRequest version field"}
}
if r.Version == 0 || len(r.Topics) > 0 {
Expand Down

0 comments on commit 34bc8f9

Please sign in to comment.