multistream/negotiated: Propagate poll_close on unreceived protocol messages#62
multistream/negotiated: Propagate poll_close on unreceived protocol messages#62
Conversation
Signed-off-by: Alexandru Vasile <[email protected]>
Signed-off-by: Alexandru Vasile <[email protected]>
Signed-off-by: Alexandru Vasile <[email protected]>
Signed-off-by: Alexandru Vasile <[email protected]>
Signed-off-by: Alexandru Vasile <[email protected]>
Signed-off-by: Alexandru Vasile <[email protected]>
Signed-off-by: Alexandru Vasile <[email protected]>
Signed-off-by: Alexandru Vasile <[email protected]>
Signed-off-by: Alexandru Vasile <[email protected]>
Signed-off-by: Alexandru Vasile <[email protected]>
Signed-off-by: Alexandru Vasile <[email protected]>
| // However, for the Litep2p the negotation must conclude before closing the | ||
| // lazy negotation of protocol. We'll wait for the close until the | ||
| // server has produced a message, in this test that means forever. |
There was a problem hiding this comment.
I'm curious why it was implemented like this in the first place. Aren't we in a Chesterton's fence situation here?
There was a problem hiding this comment.
Yep indeed, I wonder if this affects something in substrate. Proly would be good to have it running in versi for a while. I'll wait a bit for that and group this PR with the clippy PR (and any others) for testing
There was a problem hiding this comment.
cc @altonen would love to get your feedback on this if you remember why the change was needed 🙏
There was a problem hiding this comment.
I honestly don't even remember touching the multistream-select code. Did you check the behavior in this test against the latest multistream-select that libp2p uses or some other version? I wonder if it could be related to this: paritytech/substrate#14691
This PR backports https://github.com/libp2p/rust-libp2p/pull/4019/files, effectively ensuring that our `poll_close` flushes any data immediately without waiting for negotiation to complete. Closes an outdated PR: #62 cc @paritytech/networking --------- Signed-off-by: Alexandru Vasile <[email protected]>
|
No longer needed, this has been included in the latest v0.9.1 release |
This PR ensures that lazily negotiated protocols can be closed before the specific protocol message has been received.
Closes: #60
cc @paritytech/networking