Pull money manipulation out of the thread for thread safety

This commit is contained in:
2026-03-11 19:50:52 -07:00
parent 9fff1db185
commit 9b5ebb4140
2 changed files with 50 additions and 20 deletions
@@ -51,7 +51,7 @@ namespace Controllers.Payment {
}
// Remove the money and save
_DBdriver.Set( dbPrefix + "money", (result - Price).ToString());
// _DBdriver.Set( dbPrefix + "money", (result - Price).ToString()); -> Dont save in here as its done externally for thread safty
found.PaymentSuccess = true;
found.Processed = true;
return (true, "");
@@ -89,7 +89,7 @@ namespace Controllers.Payment {
}
// Add the money and save
_DBdriver.Set( dbPrefix + "money", (result + Price).ToString());
// _DBdriver.Set( dbPrefix + "money", (result + Price).ToString()); -> Dont save in here as its done externally for thread safty
found.PaymentSuccess = true;
found.Processed = true;
return (true, "");