Skip to content
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

Packets are sometimes unnecessarily resent in a loop #4

Closed
gioiann opened this issue Jun 24, 2019 · 2 comments
Closed

Packets are sometimes unnecessarily resent in a loop #4

gioiann opened this issue Jun 24, 2019 · 2 comments
Labels
bug Something isn't working

Comments

@gioiann
Copy link

gioiann commented Jun 24, 2019

Currently a packet is resent if no ACK is received before Round-Trip Time + 10ms since it was sent.
This is "fine" for most of the servers sending ACKs every 10ms (PocketMine)
But there are some servers, like SteadFast2 which instead will send ACKs every 25ms

The RTT is not perfect, changes continuously overtime and only indicates a rough estimate of the ping latency which is different than the ACK one

So, on some servers packets will be resent forever since it's impossible to receive an ACK in time.

The effect of this is not noticeable because the client and server will automatically discard duplicate packets.

@gioiann
Copy link
Author

gioiann commented Jun 24, 2019

Also, on lbsg (Steadfast2 servers) the connected pong is wrongly encoded so this raknet is not able to measure the RTT at all resulting in a fixed delay of 30ms. So if an ACK isn't received in 30ms the packets will be resent.
So since Steadfast2 sends ACKs every 25ms , in this case an ACK needs to arrive at a fixed 5ms delay which will never happen.

@Sandertv
Copy link
Owner

Fixed by 6c06f83, thanks for the additional information on Steadfast, that was helpful.

@Sandertv Sandertv added the bug Something isn't working label Jun 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants