Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

Commit

Permalink
Revert "Fix PartitionConsumer race condition on Close. (#258)"
Browse files Browse the repository at this point in the history
This reverts commit 6230ffb.
  • Loading branch information
dim committed Aug 16, 2018
1 parent 9aa81a2 commit c618e60
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion consumer.go
Expand Up @@ -295,7 +295,7 @@ func (c *Consumer) Close() (err error) {
for range c.errors {
}
for p := range c.partitions {
p.AsyncClose()
_ = p.Close()
}
for range c.notifications {
}
Expand Down
2 changes: 1 addition & 1 deletion partitions.go
Expand Up @@ -86,7 +86,7 @@ func (c *partitionConsumer) InitialOffset() int64 { return c.initialOffset }
// AsyncClose implements PartitionConsumer
func (c *partitionConsumer) AsyncClose() {
c.closeOnce.Do(func() {
c.PartitionConsumer.AsyncClose()
c.closeErr = c.PartitionConsumer.Close()
close(c.dying)
})
}
Expand Down

3 comments on commit c618e60

@longquanzheng
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @dim why do we revert it?

@dim
Copy link
Member Author

@dim dim commented on c618e60 Aug 17, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

because of #259

@dim
Copy link
Member Author

@dim dim commented on c618e60 Aug 17, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I need to look into this properly but don't really have the time this week

Please sign in to comment.