-
Notifications
You must be signed in to change notification settings - Fork 1k
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
ping-client example is not working properly. #434
Comments
Coincidentally @twittner and me just discussed this IRL. It appears that the JS implementation, which the Rust implementation is based upon, was actually not conforming to what it should be. Dialers and listeners are both allowed to open the same substream, and they are differentiated by flags. |
cf. libp2p/mplex#3 and libp2p/go-mplex#26 |
@echupriyanov: With #436 being merged, would you mind testing this again? |
@twittner Thanks! Example is now working perfectly! |
There is an issue with
ping-client
. It never receives ping to itself.Enabling trace log reveals following error:
Looking further into
mplex
code shows, that error happens here:Since in this example we are in dialing mode,
mplex
attempts to open substream with id 0, advancinginner.next_outbound_stream_id
to 2. And when it tries to accept inboundOpen
request for the substream with id 0 on the same endpoint, we hit"invalid substream id opened"
condition.Not sure at this moment how this problem can be resolved properly.
The text was updated successfully, but these errors were encountered: