Browse Source

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

Erjan Gavalji 2 năm trước cách đây
mục cha
commit
db6f956bbd
1 tập tin đã thay đổi với 2 bổ sung4 xóa
  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
                     {