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
Hotfix pubsub subscribe #735
Conversation
and refactor
This is actually breaking a lot of tests.. Because this is a hotfix anyway I'll see if I can modify some of the code to avoid a lot of test refactoring for now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Few comments.
This reverts commit dd9b096.
to suppress warnings
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few small nitpicks, but my main question is if we can avoid the logic that checks if we are subscribed and just always try to subscribe unconditionally.
Co-authored-by: Spencer T Brody <spencer@3box.io>
@stbrody yeah as joel mentioned it throws an error that you are already subscribed. But agree it's probably worth just doing that in case the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just one Q
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! This looks much cleaner. LGTM mod one comment about making sure the console doesn't fill with errors when everything is actually working as expected
Motivation
Our ipfs node on infra is going down periodically (reason tbd) and when it reboots we stop receiving pubsub messages.
Created an issue on js-ipfs repo here ipfs/js-ipfs#3465 -- the error handler for pubsub is broken in Node.js
Changes
anchorService
before removing listeners (which was breaking tests)