Przeglądaj źródła

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

Erjan Gavalji 2 lat temu
rodzic
commit
db6f956bbd
1 zmienionych plików z 2 dodań i 4 usunięć
  1. 2 4
      worker/src/Worker/Program.cs

+ 2 - 4
worker/src/Worker/Program.cs

@@ -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
                     {