From 1cc4f829498306d7fdae252d517ba6b59ffc78d7 Mon Sep 17 00:00:00 2001 From: Dragos Daian Date: Mon, 9 Dec 2024 17:39:08 +0100 Subject: [PATCH] Use supported protocols for game_id and reconnection token instead of headers. Update lobby_client.cpp --- modules/blazium_sdk/lobby/lobby_client.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/modules/blazium_sdk/lobby/lobby_client.cpp b/modules/blazium_sdk/lobby/lobby_client.cpp index 6113107a6469..02dce01302ad 100644 --- a/modules/blazium_sdk/lobby/lobby_client.cpp +++ b/modules/blazium_sdk/lobby/lobby_client.cpp @@ -119,10 +119,13 @@ bool LobbyClient::connect_to_lobby() { } String lobby_url = get_server_url(); String url = lobby_url; - Vector headers; - headers.push_back("GAME_ID: " + game_id); - headers.push_back("RECONNECTION_TOKEN: " + reconnection_token); - _socket->set_handshake_headers(headers); + PackedStringArray protocols; + protocols.push_back("blazium"); + protocols.push_back(game_id); + if (reconnection_token != "") { + protocols.push_back(reconnection_token); + } + _socket->set_supported_protocols(protocols); Error err = _socket->connect_to_url(url); if (err != OK) { set_process_internal(false);