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

client/core: resubscribe to order books #503

Merged
merged 5 commits into from
Jul 13, 2020

Conversation

song50119
Copy link
Contributor

Resolve #463

Copy link
Member

@JoeGruffins JoeGruffins left a comment

Choose a reason for hiding this comment

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

This is subscribing to all of the market order books fine for me, but I wonder if it could be made to subscribe only to markets the client is currently viewing? I'm not sure how that would work tbh. Also, markets don't seem to unsubscribe. When browsing with the webserver, markets do unsubscribe after some time has passed. And if the markets are subscribed with the method here, and I visit the page with my browser, I start seeing errors: 2020-06-23 18:36:59.532 [ERR] CORE: error unsubscribing from dcr_btc

It would be easier to debug if these logs included what market they are for: 2020-06-23 18:41:20.003 [TRC] CORE: notify: |DATA| (epoch) - Index: 159290528

client/core/core.go Outdated Show resolved Hide resolved
@song50119
Copy link
Contributor Author

@JoeGruffins
Can you reproduce to get 2020-06-23 18:36:59.532 [ERR] CORE: error unsubscribing from dcr_btc
I think these logs implemented on other PRs 2020-06-23 18:41:20.003 [TRC] CORE: notify: |DATA| (epoch) - Index: 159290528
Thank you

@dnldd
Copy link
Member

dnldd commented Jun 29, 2020

Looks good, haven't tested yet however.

client/core/types.go Outdated Show resolved Hide resolved
client/core/core.go Outdated Show resolved Hide resolved
client/core/core.go Outdated Show resolved Hide resolved
client/core/core.go Outdated Show resolved Hide resolved
Copy link
Member

@JoeGruffins JoeGruffins left a comment

Choose a reason for hiding this comment

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

Working well now.

client/core/core.go Outdated Show resolved Hide resolved
client/core/core.go Show resolved Hide resolved
client/core/core.go Outdated Show resolved Hide resolved
Copy link
Member

@buck54321 buck54321 left a comment

Choose a reason for hiding this comment

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

Looks good.

@chappjc chappjc merged commit cde7fb5 into decred:master Jul 13, 2020
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.

core: need to resubscribe to order books on reconnect
5 participants