summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-11-07 08:47:03 +0100
committerGitHub <noreply@github.com>2022-11-07 08:47:03 +0100
commit7d4e3a0ea265e9b2f3060a2198c59e20288fb346 (patch)
treebb3bb1ff3009ceced1c36d4a9f9103e9da874c3a /modules
parent19d8e36c8e167fb1b27a35ded1245883b97e6541 (diff)
parent0a1a40e6ebdbf018efd8dbb92a61c6c2867af2a0 (diff)
Merge pull request #68202 from zaevi/fix_Web_WebSocket_failed
Fix WebSocket connection failed on Web.
Diffstat (limited to 'modules')
-rw-r--r--modules/websocket/emws_peer.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/websocket/emws_peer.cpp b/modules/websocket/emws_peer.cpp
index 3bd132bc73..eea015e486 100644
--- a/modules/websocket/emws_peer.cpp
+++ b/modules/websocket/emws_peer.cpp
@@ -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;