Pull money manipulation out of the thread for thread safety
This commit is contained in:
1 parent
9fff1db185
commit
9b5ebb4140
2 files changed
+50
-20
No files matched your search
@@ -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, "");
|
||||
|
||||
Reference in new issue
Block a user