Skip to content
320 changes: 85 additions & 235 deletions GenOnlineService/Constants.cs

Large diffs are not rendered by default.

13 changes: 3 additions & 10 deletions GenOnlineService/Controllers/Lobbies/LobbiesController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -328,8 +328,6 @@ public async Task<APIResult> Put()

if (playerSession != null)
{
// cleanup any zombie lobbies
await _lobbyManager.CleanupUserLobbiesNotStarted(user_id);

await using var db = await _dbFactory.CreateDbContextAsync();
string strDisplayName = await Database.Users.GetDisplayName(db, user_id);
Expand All @@ -342,14 +340,9 @@ public async Task<APIResult> Put()
result.result = 1;
result.lobby_id = newLobbyID;

// TODO: What if this fails? just let them proceed? just means only direct connect people will be able to play
// get some turn credentials
TURNCredentialContainer? turnCredentials = await TURNCredentialManager.CreateCredentialsForUser(user_id);
if (turnCredentials != null)
{
result.turn_username = turnCredentials.m_strUsername;
result.turn_token = turnCredentials.m_strToken;
}
var credentials = await _lobbyManager.CreateLobbyRelayCredentialsAsync(playerSession, newLobbyID);
result.turn_username = credentials.Username;
result.turn_token = credentials.Token;
}
else
{
Expand Down
Loading
Loading