Skip to content

Commit

Permalink
Make sure handleAllVotes returns true at least once
Browse files Browse the repository at this point in the history
  • Loading branch information
kimden committed Apr 1, 2024
1 parent c520c44 commit 31bdb52
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/network/protocols/server_lobby.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4362,13 +4362,14 @@ bool ServerLobby::handleAllVotes(PeerVote* winner_vote,
Log::warn("ServerLobby",
"Missing track %s from majority.", top_track.c_str());
it = m_peers_votes.begin();
return false;
if (!isVotingOver())
return false;
}
*winner_peer_id = it->first;
*winner_vote = it->second;
return true;
}
else if (isVotingOver())
if (isVotingOver())
{
// Pick the best lap (or soccer goal / time) from only the top track
// if no majority agreement from all
Expand Down

0 comments on commit 31bdb52

Please sign in to comment.