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

Live replication does not forward new feeds #27

Closed
telamon opened this issue May 12, 2019 · 0 comments
Closed

Live replication does not forward new feeds #27

telamon opened this issue May 12, 2019 · 0 comments

Comments

@telamon
Copy link
Contributor

telamon commented May 12, 2019

I stumbled upon this by accident while repairing the encryption, turns out that even
though our feeds support live-replication (announcement of new feed-entries), multifeed itself never announced new feeds to existing connections.
(The feed exchange happens only once during initial handshake)

Currently you have to drop the connection to an active peer and reconnect in order for new feeds-lists to be properly re-exchanged.

A quick solution would be to have a list with references to all currently connected peers.
And whenever a multifeed.feed(...) event is emitted then send an mux#have event on each connected peer-socket.
This will re-start the feed-exchange on both ends and new feeds should successfully be forwarded throughout the swarm.

For safety reasons, we should also throttle received "have" events to avoid letting remote peers exploit this feature.

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

No branches or pull requests

1 participant