Skip to content

Commit

Permalink
Used headerLen
Browse files Browse the repository at this point in the history
  • Loading branch information
jeongkyun-oh committed Jun 29, 2021
1 parent d8c9ed7 commit f3305b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion datasync/chaindatafetcher/kafka/consumer.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func newSegment(msg *sarama.ConsumerMessage) (*Segment, error) {
version := ""
producerId := ""

if len(msg.Headers) == MsgHeaderLength {
if headerLen == MsgHeaderLength {
keyVersion := string(msg.Headers[MsgHeaderVersion].Key)
if keyVersion != KeyVersion {
return nil, fmt.Errorf("%v [expected: %v, actual: %v]", wrongHeaderKeyErrorMsg, KeyVersion, keyVersion)
Expand Down

0 comments on commit f3305b8

Please sign in to comment.