rust-libp2p: FloodSub is not working as of b8a312f7d512c25f86bc16989cb588900483946d
At present master (commit b8a312f7d512c25f86bc16989cb588900483946d) FloodSub doesn’t seem to work properly.
When I run provided chat example, I don’t see messages being delivered between nodes.
Running example with debug enabled, I see, that dialed TCP connection is dropped immediately after successful negotiation.
Changing FloodsubHandler::connection_keep_alive() to always return true resolves this issue.
My guess is that this happens because:
libp2pcloses idle (useless?) TCP connectionsfloodsubcloses the substream after successful send.
So, we end up with no TCP connection between nodes.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 18 (12 by maintainers)
I see. In that case, I’d suggest to add something like keep_alive flag to the FloodsubHandler, which is initialized to true on start, and can be turned off by
NetworkBehaviourwithSendEventaction