Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mm: Close book feeds #2907

Merged
merged 2 commits into from
Aug 12, 2024
Merged

mm: Close book feeds #2907

merged 2 commits into from
Aug 12, 2024

Conversation

martonp
Copy link
Contributor

@martonp martonp commented Aug 11, 2024

Book feeds were not being closed, leading to warning logs.

Book feeds were not being closed, leading to warning logs.
@peterzen
Copy link
Member

LGTM

@@ -465,6 +465,7 @@ func (a *simpleArbMarketMaker) botLoop(ctx context.Context) (*sync.WaitGroup, er
a.rebalance(epoch.Current)
}
case <-ctx.Done():
bookFeed.Close()
Copy link
Member

Choose a reason for hiding this comment

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

Put it up after defer wg.Done() please. Here and two other places.

@@ -465,6 +465,7 @@ func (a *simpleArbMarketMaker) botLoop(ctx context.Context) (*sync.WaitGroup, er
a.rebalance(epoch.Current)
}
case <-ctx.Done():
bookFeed.Close()
Copy link
Member

Choose a reason for hiding this comment

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

Looks like you need to close this if you get an error from SubscribeMarket above too.

@buck54321 buck54321 merged commit 14f573b into decred:master Aug 12, 2024
5 checks passed
buck54321 pushed a commit that referenced this pull request Aug 12, 2024
* mm: Close book feeds

Book feeds were not being closed, leading to warning logs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants