-
Notifications
You must be signed in to change notification settings - Fork 1.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
Messages Concatenated Unexpectedly #250
Comments
Not a bug. Continued on https://discuss.ipfs.io/t/go-libp2p-messages-concatenated-unexpectedly/1543. |
Actually, that second example looks like it should work. This may be a bug in go-multicodec. |
Yes, this is a bug in go-multicodec. If you pass |
@Stebalien should we keep this open until multiformats/go-multicodec#24 is fixed? |
This isn't really a bug in go-libp2p. |
Reopening because this does affect the protocol-multiplexing-with-multicodecs example. |
Fixed by deprecating the library. There was no good way to fix this. |
* remove TODO for PeerConnected and PeerDisconnected from Notifiee This is now done via the event bus. * remove OpenedStream and ClosedStream from Notifiee
Hi,
I've been noticing sometimes my messages get dropped. After some digging, I realized when messages get sent too closely together, sometimes they get concatenated into a single message (msg1 and msg2 get turned into msg1msg2). This is a problem because the multicodec unmarshalling ignores one of the messages.
I've written 2 examples to illustrate this issue.
In
race1()
, you will see the messages getting concatenated like this:In
race2()
, you'll see messages getting dropped:I could try and do the unmarshalling manually, but the data off the wire is encrypted because I'm using encrypted connections, and I'm not quite sure how to decrypt it manually.
Anything I can do to make sure the messages aren't concatenated?
The text was updated successfully, but these errors were encountered: