Skip to content

Godot will not reconnect to server if OS connection happens after app is launched #310

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

Closed
Xananax opened this issue Feb 11, 2022 · 0 comments · Fixed by #469
Closed

Godot will not reconnect to server if OS connection happens after app is launched #310

Xananax opened this issue Feb 11, 2022 · 0 comments · Fixed by #469
Labels
bug Something isn't working as intended help wanted Extra attention is needed

Comments

@Xananax
Copy link
Contributor

Xananax commented Feb 11, 2022

If you launch the app with wifi off, the app is disconnected, as it should. If you then connect, Godot can't reconnect to the given hostname.

The error seem to indicate that Godot tries to resolve the hostname once, then caches that and doesn't try again.

image

This is a function that tries to reconnect every 3 seconds in case of failure. I was disconnected for the first 2 ~ 3 lines, but I was connected after that

To Reproduce
Steps to reproduce the bug:

  1. Either set ConnectionChecker's print_debug_strings to true (or observe the connection light in any Practice)
  2. disable your OS connection
  3. launch the app
  4. Note that the connection light in Practices says you're offline, and ConnectionChecker prints "attempting to connect..." repeatedly
  5. Note that the Errors tab contains connect_to_host: Condition "ip_candidates.empty()"
  6. Turn your connection OS on
  7. Despite WebSocketClient.connect_to_url being called again, and the server being available, Godot won't connect

Expected behavior

Godot should try to resolve the hostname again (if the error is correct and if this is the problem)

Information about your device (please complete the following information):

  • Operating System: Linux
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working as intended help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants