Skip to content

Commit

Permalink
Use supported protocols for game_id and reconnection token instead of…
Browse files Browse the repository at this point in the history
… headers.
  • Loading branch information
Ughuuu committed Dec 9, 2024
1 parent e866b0b commit e1ccea0
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions modules/blazium_sdk/lobby/lobby_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,12 @@ bool LobbyClient::connect_to_lobby() {
}
String lobby_url = get_server_url();
String url = lobby_url;
Vector<String> 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(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);
Expand Down

0 comments on commit e1ccea0

Please sign in to comment.