Skip to content

Commit dca1ba6

Browse files
authored
Merge pull request #1286 from aksdb/fix-heartbeat-deadlock
fixed potential deadlock when a heartbeat request fails
2 parents 6a7bac8 + 6c949c0 commit dca1ba6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

consumer_group.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -657,6 +657,12 @@ func (s *consumerGroupSession) heartbeatLoop() {
657657
resp, err := s.parent.heartbeatRequest(coordinator, s.memberID, s.generationID)
658658
if err != nil {
659659
_ = coordinator.Close()
660+
661+
if retries <= 0 {
662+
s.parent.handleError(err, "", -1)
663+
return
664+
}
665+
660666
retries--
661667
continue
662668
}

0 commit comments

Comments
 (0)