Fix the case of losing a vote when actual vote found in Redis and db connection was closed

This commit is contained in:
Erjan Gavalji
2022-12-08 11:29:50 +02:00
parent e96cc16420
commit db6f956bbd

View File

@@ -48,10 +48,8 @@ namespace Worker
Console.WriteLine("Reconnecting DB");
pgsql = OpenDbConnection("Server=db;Username=postgres;Password=postgres;");
}
else
{ // Normal +1 vote requested
UpdateVote(pgsql, vote.voter_id, vote.vote);
}
// Normal +1 vote requested
UpdateVote(pgsql, vote.voter_id, vote.vote);
}
else
{