Skip to content

Commit

Permalink
Fix unable to close consumer after unsubscribe in Shared Subscription (
Browse files Browse the repository at this point in the history
  • Loading branch information
cgfork committed Jun 17, 2020
1 parent 62203d7 commit 1e00fb6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pulsar/consumer_partition.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,10 @@ func (pc *partitionConsumer) internalUnsubscribe(unsub *unsubscribeRequest) {
if err != nil {
pc.log.WithError(err).Error("Failed to unsubscribe consumer")
unsub.err = err
// Set the state to ready for closing the consumer
pc.state = consumerReady
// Should'nt remove the consumer handler
return
}

pc.conn.DeleteConsumeHandler(pc.consumerID)
Expand Down

0 comments on commit 1e00fb6

Please sign in to comment.