diff options
author | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2019-10-11 18:39:03 +0200 |
---|---|---|
committer | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2019-10-15 14:15:02 +0200 |
commit | d75e0de729ab3f6e809f025e632be41ad2e476b7 (patch) | |
tree | 60909baeac4be9ce6ab1367c91a02a058425bff4 /modules/websocket/emws_client.cpp | |
parent | 1fed266bf5452b30376db62495f4985f6975f2c1 (diff) |
Fix HTML5 build after 67a4c30.
I messed up a rebase and a commit was partly skipped
Diffstat (limited to 'modules/websocket/emws_client.cpp')
-rw-r--r-- | modules/websocket/emws_client.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/modules/websocket/emws_client.cpp b/modules/websocket/emws_client.cpp index fad766ea5d..983db60d5e 100644 --- a/modules/websocket/emws_client.cpp +++ b/modules/websocket/emws_client.cpp @@ -64,9 +64,15 @@ EMSCRIPTEN_KEEPALIVE void _esws_on_close(void *obj, int code, char *reason, int } } -Error EMWSClient::connect_to_host(String p_host, String p_path, uint16_t p_port, bool p_ssl, const PoolVector<String> p_protocols, const Vector<String> p_custom_headers) { +Error EMWSClient::connect_to_host(String p_host, String p_path, uint16_t p_port, bool p_ssl, const Vector<String> p_protocols, const Vector<String> p_custom_headers) { + + String proto_string; + for (int i = 0; i < p_protocols.size(); i++) { + if (i != 0) + proto_string += ","; + proto_string += p_protocols[i]; + } - String proto_string = p_protocols.join(","); String str = "ws://"; if (p_custom_headers.size()) { |