-
-
Notifications
You must be signed in to change notification settings - Fork 22k
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
WebSocketPeer.connect_to_url() always returns 0 i.e, OK #81839
Comments
cc @Faless |
FYI: Example invalid URLs:
|
@timothyqiu Good point. I tried those 2 and they give 31 i.e, Also, shouldn't there be some kind of connection failure errors? Getting |
The returned Error is for those who want to make better error report on the UI for user provided URL I think. Apart from string validation, TLS validation is also done when calling this function since it doesn't take a long time. Note |
WebSocketPeer methods are not blocking, as explained by @timothyqiu the URL As mentioned, you should check the value of |
I am facing an issue where the get_ready_state() does not update when the network cable connected to the ip the websocket is connected to. I use poll() at the beginning in _process(). |
Affects me too. |
Ok, but the method poll is broken and get_ready_state is getting stuck at 1 even after the socket disconnects |
Godot version
master - v4.2.dev.custom_build [4df80b0]
System information
Windows 11 Pro 22H2 - Vulkan API 1.3.250 - Forward+ - Using Vulkan Device #0: AMD - Radeon RX 570 Series
Issue description
WebSocketPeer.connect_to_url() always returns 0 i.e, OK regardless of.
Just try:
in any script of any godot project. It will always return 0 i.e, OK.
Steps to reproduce
WebSocketPeer.connect_to_url()
and check its return value.Minimal reproduction project
N/A.
Can be reproduced in any project with 2 lines:
The text was updated successfully, but these errors were encountered: