mirror of
https://github.com/godotengine/godot.git
synced 2024-11-12 23:24:26 +00:00
Fix WebSocket connection failed on Web.
This commit is contained in:
parent
889868cbbc
commit
0a1a40e6eb
@ -95,6 +95,10 @@ Error EMWSPeer::connect_to_url(const String &p_url, bool p_verify_tls, Ref<X509C
|
||||
requested_url += ":" + String::num(port);
|
||||
}
|
||||
|
||||
if (!path.is_empty()) {
|
||||
requested_url += path;
|
||||
}
|
||||
|
||||
peer_sock = godot_js_websocket_create(this, requested_url.utf8().get_data(), proto_string.utf8().get_data(), &_esws_on_connect, &_esws_on_message, &_esws_on_error, &_esws_on_close);
|
||||
if (peer_sock == -1) {
|
||||
return FAILED;
|
||||
|
Loading…
Reference in New Issue
Block a user