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

fix keepalive being multiplied in server timeout #4663

Merged
merged 2 commits into from
Sep 1, 2022

Conversation

ebbit1q
Copy link
Member

@ebbit1q ebbit1q commented Aug 31, 2022

Short roundup of the initial problem

a timeout happened after the client not receiving anything for keepalive * keepalive * maxtimeout (5 * 5 * 10) seconds instead of what you'd expect. seems to have been an oversight in #1313

What will change with this Pull Request?

it now only uses keepalive once instead of twice, this means it should now take 50 seconds to time out when disconnected, we could also change the value of the max timeout (currently 10) to something like 6 to time out in 30 seconds instead.

a timeout happened after the client not receiving anything for
keepalive * keepalive * maxtimeout (5 * 5 * 10) seconds instead of what
you'd expect, it now only uses keepalive once instead of twice this
means it should now take 50 seconds to time out when disconnected
change time between pings to 3 from 5 seconds
change timout to 5 from 10 repeats
@ebbit1q
Copy link
Member Author

ebbit1q commented Sep 1, 2022

I've decided to change it to 15 seconds instead, this means the server will be pinged almost twice as often now and the amount of times it will try is halved. we could change this distribution though.

Copy link
Member

@ZeldaZach ZeldaZach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't agree with how the ping() method is defined, but this change does improve things incrementally, so it should be okay for now.

@ebbit1q ebbit1q merged commit 2f100f2 into Cockatrice:master Sep 1, 2022
@ebbit1q ebbit1q deleted the fix_timeout branch September 1, 2022 00:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants