Skip to content

Commit

Permalink
Merge pull request #6 from youzan/fix/not_removing_producer_in_add_ne…
Browse files Browse the repository at this point in the history
…w_topic

do not expire producer if pass in topic is NOT empty
  • Loading branch information
absolute8511 authored Nov 14, 2018
2 parents e199b6b + 42c9183 commit 0406910
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions producer.go
Original file line number Diff line number Diff line change
Expand Up @@ -931,6 +931,10 @@ func (self *TopicProducerMgr) queryLookupd(newTopic string) {
self.topics[topicName] = newProducerInfo
self.topicMtx.Unlock()
}
//leave removing expired producer to timer
if newTopic != "" {
return
}
self.producerMtx.Lock()
if len(allTopicParts) > 0 {
for k, p := range self.producers {
Expand Down

0 comments on commit 0406910

Please sign in to comment.