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

fix: fix pubsub subscribe with multiple node in firefox #571

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hugomrdias
Copy link
Contributor

@hugomrdias hugomrdias commented Dec 12, 2019

In firefox one empty msg is send first to start the flow, this PR accounts for that. When merged we can enable the tests in js-ipfs https://github.com/ipfs/js-ipfs/blob/32311655d17f5e5eb3a445be9f68b44e6d60a7ef/test/core/interface.spec.js#L107

ref:
https://github.com/ipfs/js-ipfs-http-client/blob/master/src/pubsub/subscribe.js#L27-L37

@alanshaw
Copy link
Contributor

I was thinking we'd change the empty message to be a special value that the client would recognise and drop silently...this is ugly and I hate it but keeps the hack leaking into other places (like here).

@hugomrdias
Copy link
Contributor Author

close and fix in the clients ?

@alanshaw
Copy link
Contributor

...I'm just not 100% sure if it's possible (I didn't think about it too much) - for instance js-ipfs will still receive the message - do we have tests that send from firefox to a in process JS node?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants