From 31bdb52bfdde5c86bd1970476784b3fb13f51dfb Mon Sep 17 00:00:00 2001 From: kimden <23140380+kimden@users.noreply.github.com> Date: Tue, 2 Apr 2024 01:00:32 +0400 Subject: [PATCH] Make sure handleAllVotes returns true at least once --- src/network/protocols/server_lobby.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/network/protocols/server_lobby.cpp b/src/network/protocols/server_lobby.cpp index 8414b646741..70283270d3d 100644 --- a/src/network/protocols/server_lobby.cpp +++ b/src/network/protocols/server_lobby.cpp @@ -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