Replies: 1 comment 12 replies
-
Can you post your loop where you poll |
Beta Was this translation helpful? Give feedback.
12 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I’m developing a protocol that requires peers sending data to each other. To achieve that I use libp2p’s
tcp::tokio::Transport
with therequest_response
Behaviour. It’s my general understanding that the TCP transport should take care of resending lost packets: however, during unit testing, some peers sometimes get stuck indefinitely waiting for data. After implementing my own resend mechanism based on timeouts, the issue seems to be resolved, but I’m still wondering why TCP isn’t already taking care of that.Each peer spins up a router which contains a swarm it uses to connect to others, for which the code is below. Peers run within their own
tokio::task
in unit tests, but obviously on the same machine. That definitely doesn’t fully recapitulate real-world behavior and I guess that's where the main problem lies, but I can't tell what it actually is. Any insight is welcome, thanks!Beta Was this translation helpful? Give feedback.
All reactions