Skip to content

Commit

Permalink
Merge pull request #9 from traP-jp/develop
Browse files Browse the repository at this point in the history
Fix lock type
  • Loading branch information
UnABC authored Sep 7, 2024
2 parents 9b47617 + 0045756 commit 9c96e8a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion room.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ bool room_t::is_in_lobby() const {
}

void room_t::start_game() {
shared_lock lock(room_mutex);
lock_guard lock(room_mutex);
if (!in_lobby) throw forbidden_error("Game already started.");
if (users.size() < 2) throw forbidden_error("Not enough players to start the game.");
in_lobby = false;
Expand Down

0 comments on commit 9c96e8a

Please sign in to comment.