Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
Timmlion committed Jan 28, 2024
2 parents d728bd4 + 01cdbe7 commit 843d4cb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions backend/MemeBE/hubs/GameHub.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public async Task SendMessage(string user, string message)

public async Task GetRooms()

Check warning on line 33 in backend/MemeBE/hubs/GameHub.cs

View workflow job for this annotation

GitHub Actions / build

This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.
{
Console.WriteLine("GetRooms");
/*Console.WriteLine("GetRooms");
try
{
string[] roomIDs = rooms.Values
Expand All @@ -45,7 +45,7 @@ public async Task GetRooms()
catch
{
// ignore
}
}*/
}

public async Task CreateRoom(string playerName)
Expand Down Expand Up @@ -294,7 +294,7 @@ public async Task GameEnded(Room room)

await Clients.Group(room.RoomId)
.SendAsync("GameEnded", message);
rooms.Remove(room.RoomId);
//rooms.Remove(room.RoomId);
}
public List<Player> GetOtherPlayers(Room room, string connId)
{
Expand Down Expand Up @@ -432,4 +432,4 @@ await Clients.Group(room.RoomId)
// Target = 0 - all
// 1 - player
// 2 - persistent slot
}
}
4 changes: 2 additions & 2 deletions client/static/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ $(document).ready(function () {
function initServer() {
connection = new signalR.HubConnectionBuilder()
// .withUrl("https://578d-87-206-130-93.ngrok-free.app/GameHub")
.withUrl("https://memethegatheringapi.azurewebsites.net/GameHub")
.withUrl("https://magicthememeingapiprod.azurewebsites.net/GameHub")
// .withUrl("https://578d-87-206-130-93.ngrok-free.app/GameHub")
.withAutomaticReconnect()
.configureLogging(signalR.LogLevel.Information)
Expand Down Expand Up @@ -363,4 +363,4 @@ function ForceEndgame(){
connection.invoke("DebugGameEnded", currentRoomID).catch(function (err) {
return console.error(err.toString());
});
}
}

0 comments on commit 843d4cb

Please sign in to comment.