Skip to content

Commit

Permalink
Merge pull request #1286 from aksdb/fix-heartbeat-deadlock
Browse files Browse the repository at this point in the history
fixed potential deadlock when a heartbeat request fails
  • Loading branch information
bai authored Feb 19, 2019
2 parents 6a7bac8 + 6c949c0 commit dca1ba6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions consumer_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -657,6 +657,12 @@ func (s *consumerGroupSession) heartbeatLoop() {
resp, err := s.parent.heartbeatRequest(coordinator, s.memberID, s.generationID)
if err != nil {
_ = coordinator.Close()

if retries <= 0 {
s.parent.handleError(err, "", -1)
return
}

retries--
continue
}
Expand Down

0 comments on commit dca1ba6

Please sign in to comment.