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

Added timeout to IP-address retrieval in order to prevent hang and disconnect #843

Merged
merged 3 commits into from
Mar 23, 2020
Merged

Added timeout to IP-address retrieval in order to prevent hang and disconnect #843

merged 3 commits into from
Mar 23, 2020

Conversation

ciqven
Copy link
Contributor

@ciqven ciqven commented Feb 10, 2020

Greetings,
Since about a week, sometimes everyone logging into my server experiences a total game freeze after about 10 seconds in game. The freeze lasts for about a minute, after which they disconnect. I have pinpointed the probable cause to #813 , I can see the same message about https://myip.ipip.net in my server log the moment it hangs (and only then).

The suggested workaround in that issue (disabling my internet) is not possible for me, since there are also other services running on the same node which require the internet. This is also not a real fix.

My suggestion is adding a timeout of say 5 seconds to the connection attempt, this should prevent Minecraft from freezing up. Ideally this connection should of course be done asynchronously, but this quick fix should suffice for now.

This is my first time contributing on GitHub (I normally use GitLab) so please tell me if I need to improve something.

Thank you for considering, have a nice day!

@Paindar Paindar changed the base branch from master to dev March 23, 2020 05:27
@Paindar Paindar merged commit 2f8409a into LambdaInnovation:dev Mar 23, 2020
@Paindar
Copy link
Contributor

Paindar commented Mar 23, 2020

Thank you for your support.

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.

3 participants