Skip to content

Commit

Permalink
add err checks
Browse files Browse the repository at this point in the history
  • Loading branch information
travisjeffery committed Dec 21, 2016
1 parent 6ebb5ce commit ac25989
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions protocol/leader_and_isr_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,13 @@ func (r *LeaderAndISRRequest) Encode(e PacketEncoder) error {
e.PutInt32(p.ControllerEpoch)
e.PutInt32(p.Leader)
e.PutInt32(p.LeaderEpoch)
e.PutInt32Array(p.ISR)
if err = e.PutInt32Array(p.ISR); err != nil {
return err
}
e.PutInt32(p.ZKVersion) // TODO: hardcode this?
e.PutInt32Array(p.Replicas)
if err = e.PutInt32Array(p.Replicas); err != nil {
return err
}
}
return nil
}
Expand Down

0 comments on commit ac25989

Please sign in to comment.